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,
accelaStatus: String,
changes: Object,
county: Object,
county: {
id: mongoose.Types.ObjectId,
pid: String,
name: String,
avatar: String,
},
client: mongoose.Types.ObjectId,
clientData: Object,
createdAt: Date,

View File

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