katoikia-app/servicio-reportes/src/schemas/report.schema.ts

22 lines
410 B
TypeScript
Raw Normal View History

2022-07-01 23:11:32 +00:00
import { Schema, Prop, SchemaFactory } from '@nestjs/mongoose';
import { Document, ObjectId } from 'mongoose';
export type ReportDocument = Report & Document;
@Schema({ collection: 'reports' })
export class Report {
2022-07-25 04:38:48 +00:00
@Prop()
action: string;
2022-07-01 23:11:32 +00:00
2022-07-25 04:38:48 +00:00
@Prop()
description: string;
2022-07-01 23:11:32 +00:00
2022-07-25 04:38:48 +00:00
@Prop()
date_entry: Date;
2022-07-01 23:11:32 +00:00
2022-07-25 04:38:48 +00:00
@Prop()
user_id: string;
}
2022-07-01 23:11:32 +00:00
2022-07-25 04:38:48 +00:00
export const ReportSchema = SchemaFactory.createForClass(Report);