mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
1be43911b4
Set Prettier's "trailingComma" setting to "es5" GitOrigin-RevId: 9f14150511929a855b27467ad17be6ab262fe5d5
31 lines
932 B
JavaScript
31 lines
932 B
JavaScript
const mongoose = require('../infrastructure/Mongoose')
|
|
const { UserSchema } = require('./User')
|
|
|
|
const { Schema } = mongoose
|
|
const { ObjectId } = Schema
|
|
|
|
const DeleterDataSchema = new Schema({
|
|
deleterId: { type: ObjectId, ref: 'User' },
|
|
deleterIpAddress: { type: String },
|
|
deletedAt: { type: Date },
|
|
deletedUserId: { type: ObjectId },
|
|
deletedUserLastLoggedIn: { type: Date },
|
|
deletedUserSignUpDate: { type: Date },
|
|
deletedUserLoginCount: { type: Number },
|
|
deletedUserReferralId: { type: String },
|
|
deletedUserReferredUsers: [{ type: ObjectId, ref: 'User' }],
|
|
deletedUserReferredUserCount: { type: Number },
|
|
deletedUserOverleafId: { type: Number },
|
|
})
|
|
|
|
const DeletedUserSchema = new Schema(
|
|
{
|
|
deleterData: DeleterDataSchema,
|
|
user: UserSchema,
|
|
},
|
|
{ collection: 'deletedUsers' }
|
|
)
|
|
|
|
exports.DeletedUser = mongoose.model('DeletedUser', DeletedUserSchema)
|
|
|
|
exports.DeletedUserSchema = DeletedUserSchema
|