const PropertyStatus = require('./propertyStatusModel') const chalk = require('chalk') const runSeeder = async () => { const statuses = [ // ── اصلی ──────────────────────────────────────────────────────────── { nativeName: 'موجود', englishName: 'available', color: 'success' }, { nativeName: 'فروخته شده', englishName: 'sold', color: 'contrast' }, { nativeName: 'قولنامه', englishName: 'reserved', color: 'warn' }, { nativeName: 'بلاک', englishName: 'blocked', color: 'danger' }, // ── تکمیلی ────────────────────────────────────────────────────────── { nativeName: 'در حال بررسی', englishName: 'in_review', color: 'info' }, { nativeName: 'رهن', englishName: 'mortgaged', color: 'warn' }, { nativeName: 'وراثتی', englishName: 'inherited', color: 'secondary' }, { nativeName: 'مشاع', englishName: 'joint', color: 'secondary' }, { nativeName: 'توقیف', englishName: 'seized', color: 'danger' }, { nativeName: 'در دست ساخت', englishName: 'under_construction', color: 'info' }, ] await PropertyStatus.deleteMany({}) console.log(chalk.red('Deleted all property status records.')) await PropertyStatus.create(statuses) console.log( chalk.green.bold( `PROPERTY STATUS: Created ${statuses.length} status(es)` ) ) } module.exports = { runSeeder }