/* * @author gs * @date 2020/07/21 16:08 * @modified-user songxiwen * @modified-date 2020/08/04 14:09 * @modified-description add phone prop */ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; import { Document } from 'mongoose'; import { MongoDBCollection } from '../../../constant'; @Schema({ collection: MongoDBCollection.UserProfile }) export class UserProfile extends Document { @Prop({ index: true, unique: true }) userId?: string; @Prop() country?: string; @Prop() province?: string; @Prop() city?: string; @Prop() nickname?: string; @Prop() gender?: number; @Prop() avatar?: string; } export const userProfileSchema = SchemaFactory.createForClass(UserProfile);