Accomodations ...

This commit is contained in:
Paolo Arena
2022-05-05 23:56:37 +02:00
parent b340d39348
commit fa9c6f1c6b
3 changed files with 32 additions and 34 deletions

View File

@@ -22,38 +22,28 @@ const MyHospSchema = new Schema({
required: true,
},
userId: {type: Schema.Types.ObjectId, ref: 'User'},
idSector: {
typeHosp: { // scambio casa / ospitalità
type: Number,
},
idSkill: {
numMaxPeopleHosp: {
type: Number,
default: 0,
},
idStatusSkill: [
accomodation: [
{
type: { // Letto matrimoniale / letto singolo / divano-letto / almaca / a terra sul tappeto (per sacco a pelo) / culla
type: Number,
},
location: { // in camera privata / in camera condivisa / in soggiorno / in camper / in tenda / in giardino / all'aperto
type: Number,
},
num: {
type: Number,
},
}],
preferences: [ // Accetto bambini, Accetto cani, Accetto gatti, E' consentito fumare in casa, Accessibile con sedia a rotelle
{
type: Number,
}],
idContribType: [
{
type: String,
}],
idCity: [
{
type: Number,
}],
dateTimeStart: {
type: Date,
},
dateTimeEnd: {
type: Date,
},
numLevel: {
type: Number,
default: 0,
},
adType: {
type: Number,
},
photos: [
{
imagefile: {
@@ -66,14 +56,21 @@ const MyHospSchema = new Schema({
type: String,
},
}],
idContribType: [
{
type: String,
}],
idCity: [
{
type: Number,
}],
descr: {
type: String,
},
note: {
type: String,
default: '',
},
descr: {
type: String,
},
//**ADDFIELD_MyHospS
website: {
type: String,
},
@@ -133,7 +130,6 @@ MyHospSchema.statics.getFieldsLastForSearch = function() {
];
};
MyHospSchema.statics.executeQueryTable = function(idapp, params) {
params.fieldsearch = this.getFieldsForSearch();
params.fieldsearch_last = this.getFieldsLastForSearch();
@@ -492,7 +488,6 @@ MyHospSchema.statics.getCompleteRecord = function(idapp, id) {
};
const MyHosp = mongoose.model('MyHosp', MyHospSchema);
module.exports = {MyHosp};