@backstageai/common
Version:
Common code for Backstage AI services
27 lines (24 loc) • 662 B
JavaScript
const mongoose = require("mongoose");
const UserSchema = new mongoose.Schema(
{
googleId: { type: String },
name: { type: String, required: true },
email: { type: String },
profilePicture: { type: String },
lastLogin: { type: Date, default: Date.now },
authReponse: { type: Object },
provider: {
type: String,
default: "google",
enum: ["google", "email", "apple"],
},
exponentPushToken: { type: String },
artistName: { type: String },
songTitle: { type: String },
},
{
timestamps: true,
}
);
const User = mongoose.models.User || mongoose.model("User", UserSchema);
exports.User = User;