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

30 lines
540 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-01 20:01:21 +00:00
@Prop()
start_time: string;
2022-07-01 20:01:21 +00:00
@Prop()
finish_time: string;
2022-07-01 20:01:21 +00:00
@Prop()
status: string;
@Prop()
date_entry: Date;
@Prop()
common_area_id: string;
@Prop()
user_id: string
}
export const ReservationSchema = SchemaFactory.createForClass(Reservation);