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
29 lines
697 B
JavaScript
29 lines
697 B
JavaScript
const mongoose = require('mongoose')
|
|
|
|
const propertyStatusSchema = new mongoose.Schema(
|
|
{
|
|
nativeName: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
englishName: {
|
|
type: String,
|
|
required: true,
|
|
unique: true,
|
|
},
|
|
// Color token for UI badge (success/info/warn/danger/secondary/contrast)
|
|
color: {
|
|
type: String,
|
|
default: 'secondary',
|
|
},
|
|
},
|
|
{
|
|
toJSON: { virtuals: true },
|
|
toObject: { virtuals: true },
|
|
timestamps: true,
|
|
}
|
|
)
|
|
|
|
const PropertyStatus = mongoose.model('PropertyStatus', propertyStatusSchema)
|
|
module.exports = PropertyStatus
|