feat: add schema to county object

This commit is contained in:
2025-09-22 17:10:05 +05:30
parent a8229debcb
commit 9e083754be
2 changed files with 12 additions and 2 deletions

View File

@@ -16,7 +16,12 @@ const notificationSchema = new mongoose.Schema({
permitType: String, permitType: String,
accelaStatus: String, accelaStatus: String,
changes: Object, changes: Object,
county: Object, county: {
id: mongoose.Types.ObjectId,
pid: String,
name: String,
avatar: String,
},
client: mongoose.Types.ObjectId, client: mongoose.Types.ObjectId,
clientData: Object, clientData: Object,
createdAt: Date, createdAt: Date,

View File

@@ -13,7 +13,12 @@ const permitSchema = new mongoose.Schema({
unique: true, unique: true,
}, },
permitNumber: String, permitNumber: String,
county: Object, county: {
id: mongoose.Types.ObjectId,
pid: String,
name: String,
avatar: String,
},
client: { client: {
type: mongoose.Types.ObjectId, type: mongoose.Types.ObjectId,
ref: "organization", ref: "organization",