diff --git a/server/dao/schemas/community.schema.ts b/server/dao/schemas/community.schema.ts index 5b3ee72c..e6fe5806 100644 --- a/server/dao/schemas/community.schema.ts +++ b/server/dao/schemas/community.schema.ts @@ -4,7 +4,7 @@ import { IsNotEmpty, IsString } from 'class-validator'; export type CommunityDocument = Community & Document; -@Schema() +@Schema({ timestamps: true }) export class Community { @Prop() @IsString() @@ -26,12 +26,6 @@ export class Community { @IsString() profileUrl: string; - @Prop({ default: new Date(), type: mongoose.Schema.Types.Date }) - createdAt: Date; - - @Prop({ default: new Date(), type: mongoose.Schema.Types.Date }) - updatedAt: Date; - @Prop({ type: mongoose.Schema.Types.Date }) deletedAt: Date;