katoikia-app/servicio-reservaciones/src/schemas/reservation.schema.ts

28 lines
510 B
TypeScript
Raw Normal View History

import { Schema, Prop, SchemaFactory } from '@nestjs/mongoose';
2022-07-01 20:01:21 +00:00
import { Document, ObjectId } from 'mongoose';
export type ReservationDocument = Reservation & Document;
2022-07-01 20:01:21 +00:00
@Schema({ collection: 'reservations' })
export class Reservation {
2022-07-25 04:38:48 +00:00
@Prop()
start_time: string;
2022-07-25 04:38:48 +00:00
@Prop()
finish_time: string;
2022-07-25 04:38:48 +00:00
@Prop()
status: string;
2022-07-01 20:01:21 +00:00
2022-07-25 04:38:48 +00:00
@Prop()
date_entry: Date;
2022-07-01 20:01:21 +00:00
2022-07-25 04:38:48 +00:00
@Prop()
common_area_id: string;
2022-07-01 20:01:21 +00:00
2022-07-25 04:38:48 +00:00
@Prop()
user_id: string;
}
2022-07-25 04:38:48 +00:00
export const ReservationSchema = SchemaFactory.createForClass(Reservation);