send mail

This commit is contained in:
Thomas Ruoff
2020-08-18 00:22:03 +02:00
parent 70d78427b1
commit d86f438f80
3 changed files with 50 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
import * as mongoose from 'mongoose'
import { getDays, dateFormat } from '../helpers/date'
import { getDays, dateFormatBackend } from '../helpers/date'
const BookingSchema = new mongoose.Schema(
{
@@ -12,10 +12,15 @@ const BookingSchema = new mongoose.Schema(
startDate: {
type: Date,
required: true,
get: dateFormat,
get: dateFormatBackend,
min: new Date(),
},
endDate: {
type: Date,
required: false,
get: dateFormatBackend,
min: new Date(),
},
endDate: { type: Date, required: false, get: dateFormat, min: new Date() },
status: {
type: String,
enum: ['requested', 'confirmed', 'rejected'],