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