mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
add separate booking state
This commit is contained in:
@@ -3,6 +3,8 @@ import * as mongoose from 'mongoose'
|
||||
|
||||
import { getDays, dateFormatBackend } from '../helpers/date'
|
||||
|
||||
import { BOOKING_STATUS } from './bookingStatus'
|
||||
|
||||
const BookingSchema = new mongoose.Schema(
|
||||
{
|
||||
// need a seperate uuid to be able to target a booking anonimously
|
||||
@@ -30,7 +32,7 @@ const BookingSchema = new mongoose.Schema(
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
enum: ['requested', 'confirmed', 'rejected'],
|
||||
enum: Object.values(BOOKING_STATUS),
|
||||
required: true,
|
||||
default: 'requested',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user