Skip to content

Commit 0380f04

Browse files
committed
style: add comment about auto-added mongoose timestamps
1 parent c85f823 commit 0380f04

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/src/song/entity/song.entity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ export class Song {
2424
publicId: string;
2525

2626
@Prop({ type: MongooseSchema.Types.Date, required: true, default: Date.now })
27-
createdAt: Date;
27+
createdAt: Date; // Added automatically by Mongoose: https://mongoosejs.com/docs/timestamps.html
2828

2929
@Prop({ type: MongooseSchema.Types.Date, required: true, default: Date.now })
30-
updatedAt: Date;
30+
updatedAt: Date; // Added automatically by Mongoose: https://mongoosejs.com/docs/timestamps.html
3131

3232
@Prop({ type: MongooseSchema.Types.ObjectId, required: true, ref: 'User' })
3333
uploader: Types.ObjectId;

server/src/user/entity/user.entity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export class User {
7171
@Prop({ type: Boolean, required: true, default: true })
7272
prefersDarkTheme: boolean;
7373

74-
createdAt: Date;
75-
updatedAt: Date;
74+
createdAt: Date; // Added automatically by Mongoose: https://mongoosejs.com/docs/timestamps.html
75+
updatedAt: Date; // Added automatically by Mongoose: https://mongoosejs.com/docs/timestamps.html
7676
}
7777

7878
export const UserSchema = SchemaFactory.createForClass(User);

0 commit comments

Comments
 (0)