import { Schema } from "mongoose"; import { getCommonSchemas as common,aliasedEntitySchemaOpts as opts} from "@onebro/oba-common"; import { FirstlineUserProfile } from "../types"; const {status,settings} = common(); const profile = new Schema({ created:{type:Date,default:Date.now}, updated:{type:Date,default:Date.now}, status:{type:[status],default:() => [{name:"N",time:new Date()}]}, username:{type:String,required:true,index:true,unique:true}, role:{type:String,enum:["G","U","A","S","SA"],default:"U"}, settings:{type:settings}, img:{type:String}, bio:{type:String}, motto:{type:String}, socials:{type:Schema.Types.Mixed}, stats:{type:Schema.Types.Mixed}, expYrs:{type:Number}, expLvl:{type:String}, rating:{type:Number,default:5}, following:{type:[Schema.Types.ObjectId],ref:"FirstlineUserProfile",default:[] as any[]},//following followers:{type:[Schema.Types.ObjectId],ref:"FirstlineUserProfile",default:[] as any[]},//followers },opts); export {profile as firstlineUserProfileSchema};