mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
fix all the formatting
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import * as mongoose from 'mongoose'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { dateFormatBackend, getDays, nowInTz, dateParseBackend } from '../helpers/date'
|
||||
import {
|
||||
dateFormatBackend,
|
||||
getDays,
|
||||
nowInTz,
|
||||
dateParseBackend,
|
||||
} from '../helpers/date'
|
||||
import { createCalendarEvent, deleteCalendarEvent } from '../lib/googlecalendar'
|
||||
|
||||
import { Bill } from './bill'
|
||||
@@ -16,9 +21,9 @@ export type Booking = {
|
||||
city: string
|
||||
bill?: Bill
|
||||
// format YYYY-MM-DD
|
||||
startDate: string,
|
||||
startDate: string
|
||||
// format YYYY-MM-DD
|
||||
endDate: string,
|
||||
endDate: string
|
||||
status?: BOOKING_STATUS
|
||||
purpose?: string
|
||||
org?: string
|
||||
@@ -58,14 +63,14 @@ const BookingSchema = new mongoose.Schema<BookingDocument>(
|
||||
type: String,
|
||||
required: true,
|
||||
validator: function (value: string): boolean {
|
||||
return !!dateParseBackend(value);
|
||||
return !!dateParseBackend(value)
|
||||
},
|
||||
},
|
||||
endDate: {
|
||||
type: String,
|
||||
required: true,
|
||||
validator: function (value: string): boolean {
|
||||
return !!dateParseBackend(value);
|
||||
return !!dateParseBackend(value)
|
||||
},
|
||||
},
|
||||
days: {
|
||||
@@ -160,4 +165,4 @@ const BookingModel = (mongoose.models.Booking ||
|
||||
BookingSchema
|
||||
)) as BookingModel
|
||||
|
||||
export default BookingModel;
|
||||
export default BookingModel
|
||||
|
||||
Reference in New Issue
Block a user