const mongoose = require('mongoose') const Property = require('./propertyModel') const buildingSchema = new mongoose.Schema({ builtArea: { type: Number, // مساحت زیربنا به متر مربع }, floorsCount: { type: Number, // تعداد طبقات }, unitsCount: { type: Number, // تعداد واحدها }, constructionYear: { type: Number, // سال ساخت }, elevator: { type: Boolean, // آسانسور }, parking: { type: Boolean, // پارکینگ }, warehouse: { type: Boolean, // انبار }, heatingSystem: { type: String, // سیستم گرمایش }, coolingSystem: { type: String, // سیستم سرمایش }, structureType: { type: String, // نوع سازه (اسکلت فلزی، بتنی، ...) }, flooringType: { type: String, // جنس کف (سرامیک، سنگ، لمینت، ...) }, }) const Building = Property.discriminator('Building', buildingSchema) module.exports = Building