remove *Document intefaces from FE code

This commit is contained in:
Thomas Ruoff
2020-11-06 23:37:04 +01:00
parent 71c16a289d
commit 195da65cd9
13 changed files with 84 additions and 60 deletions

View File

@@ -2,16 +2,14 @@ import * as mongoose from 'mongoose'
import { v4 as uuidv4 } from 'uuid'
import { startOfDay } from 'date-fns'
import { dateFormatBackend, getDays } from '../helpers/date'
import { BillDocument } from './bill'
import { BookerDocument } from './booker'
import { Bill } from './bill'
import { Booker } from './booker'
import { BOOKING_STATUS } from './enums'
export interface BookingDocument
extends mongoose.Document,
mongoose.SchemaTimestampsConfig {
export interface Booking {
uuid: string
booker: BookerDocument
bill: BillDocument
booker: Booker
bill: Bill
startDate: Date
endDate: Date
status: BOOKING_STATUS
@@ -21,6 +19,11 @@ export interface BookingDocument
days?: string[]
}
export interface BookingDocument
extends Booking,
mongoose.Document,
mongoose.SchemaTimestampsConfig {}
export interface BookingModel extends mongoose.Model<BookingDocument> {
findBookedDays(): Promise<string[]>
}