File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import type {
9
9
} from '@shared/validation/song/dto/types' ;
10
10
import { HydratedDocument , Schema as MongooseSchema , Types } from 'mongoose' ;
11
11
12
+ import { User } from '@server/user/entity/user.entity' ;
13
+
12
14
@Schema ( {
13
15
timestamps : true ,
14
16
versionKey : false ,
@@ -24,13 +26,13 @@ export class Song {
24
26
publicId : string ;
25
27
26
28
@Prop ( { type : MongooseSchema . Types . Date , required : true , default : Date . now } )
27
- createdAt : Date ;
29
+ createdAt : Date ; // Added automatically by Mongoose: https://mongoosejs.com/docs/timestamps.html
28
30
29
31
@Prop ( { type : MongooseSchema . Types . Date , required : true , default : Date . now } )
30
- updatedAt : Date ;
32
+ updatedAt : Date ; // Added automatically by Mongoose: https://mongoosejs.com/docs/timestamps.html
31
33
32
34
@Prop ( { type : MongooseSchema . Types . ObjectId , required : true , ref : 'User' } )
33
- uploader : Types . ObjectId ;
35
+ uploader : Types . ObjectId | User ; // Populated with the uploader's user document
34
36
35
37
@Prop ( { type : String , required : true } )
36
38
thumbnailUrl : string ;
You can’t perform that action at this time.
0 commit comments