Files
mbmanager-api/components/property/buildingModel.js
T
kavehhn ca911b97a0 REFACTOR: Belonging → Property system migration + utilities update
Property system:
- Rename belonging → property throughout (model, controller, routes, service)
- Add property sub-models: buildingModel, landModel, belongingModel
- Add property lifecycle events: createProperty, deleteProperty
- Add propertyStatus component (model, controller, routes, service, seeder)
- Add commodity and commodityTransaction model stubs

Infrastructure:
- Update transactionModel and transactionService
- Update events/index.js for new property events
- Update seeder (seederDBConnection, seederRunner)
- Update typesense client configuration
- Update upload utilities (bucket, minio)
- Update featureModel and featureSeeder
- Update categorySeeder
- Update TsApiFeatures utility
- Remove docker-compose.yml (moved to root)
- Remove legacy belonging component files
2026-08-11 20:35:47 +03:30

43 lines
1.1 KiB
JavaScript

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