mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
15 lines
445 B
JavaScript
15 lines
445 B
JavaScript
import * as mongoose from 'mongoose'
|
|
|
|
const BookerSchema = new mongoose.Schema(
|
|
{
|
|
name: { type: String, required: true },
|
|
email: { type: String, required: true, unique: true, minlength: 5 },
|
|
street: { type: String, required: true },
|
|
zip: { type: String, required: true },
|
|
city: { type: String, required: true },
|
|
},
|
|
{ timestamps: true }
|
|
)
|
|
|
|
export default mongoose.models.Booker || mongoose.model('Booker', BookerSchema)
|