Am using NestJs for a backend project and am trying to use timestamps to show update and create date but nothing shows!
@Schema()
export class Camera extends Document{
// @Prop({required: true, unique: true})
@Prop({required: true})
facility_name: string;
@Prop({required: true, unique : true})
camera_id: string;
@Prop({required: true})
camera_location: string;
@Prop({required: true})
camera_type: string;
@Prop({default : false})
is_deleted : boolean;
@Prop()
timestamps: true;
}
export const cameraSchema = SchemaFactory.createForClass(Camera); }
How can I use timestamps with this tpye of frmawork as it doesn't show any date!!