mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
remove *Document intefaces from FE code
This commit is contained in:
@@ -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[]>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user