Skip to content

Commit

Permalink
feat: 커뮤니티 수정 시 자동 updatedAt 갱신하도록 스키마 수정 #95
Browse files Browse the repository at this point in the history
  • Loading branch information
NaayoungKwon committed Nov 25, 2022
1 parent d624488 commit ff4763b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions server/dao/schemas/community.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IsNotEmpty, IsString } from 'class-validator';

export type CommunityDocument = Community & Document;

@Schema()
@Schema({ timestamps: true })
export class Community {
@Prop()
@IsString()
Expand All @@ -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;

Expand Down

0 comments on commit ff4763b

Please sign in to comment.