upload to codehub
This commit is contained in:
51
models/guidedwalkmodel.js
Normal file
51
models/guidedwalkmodel.js
Normal file
@@ -0,0 +1,51 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
const addressSchema = new Schema(
|
||||
{
|
||||
address: { type: String },
|
||||
longitude: { type: String },
|
||||
latitude: { type: String },
|
||||
},
|
||||
{ _id: false }
|
||||
);
|
||||
|
||||
const GuidedWalkBookingSchema = new Schema({
|
||||
|
||||
time_slot: Date,
|
||||
members_count: String,
|
||||
booker_first_name: String,
|
||||
booker_last_name: String,
|
||||
email: String,
|
||||
date: String,
|
||||
pan_card: String,
|
||||
start: String,
|
||||
end: String,
|
||||
telephone_number: String,
|
||||
walk_id: {
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
ref: 'rpgwalklist'
|
||||
},
|
||||
user_id: {
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
ref: 'rpguserlist'
|
||||
},
|
||||
walk_address: String,
|
||||
pickup_location: addressSchema,
|
||||
amount: Number,
|
||||
duration: String,
|
||||
order_id: String,
|
||||
payment_id: String,
|
||||
ticket_pdf: String,
|
||||
is_paid: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
created_at: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
}
|
||||
}, { versionKey: false });
|
||||
|
||||
const GuidedWalkBooking = mongoose.model('GuidedWalkBooking', GuidedWalkBookingSchema);
|
||||
module.exports = GuidedWalkBooking;
|
||||
Reference in New Issue
Block a user