Skip to content

Commit e2c50ef

Browse files
author
tanmay
committed
add organization model
1 parent f0f2cf7 commit e2c50ef

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

models/organization.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import connector from "./databaseUtil";
2+
3+
const organizationSchema = {
4+
parent: { type: connector.Schema.Types.ObjectId, ref: "Organization", required: "true" },
5+
orgID: { type: String, required: true },
6+
orgName: { type: String, required: true },
7+
orgAddress: { type: String, required: true },
8+
orgInfra: [{ type: connector.Schema.Types.ObjectId, ref: "Infrastructure", required: "true" }],
9+
accreditation: { type: connector.Schema.Types.ObjectId, ref: "Accrediation", required: "true" },
10+
department: [{ type: connector.Schema.Types.ObjectId, ref: "Department", required: "true" }],
11+
employees: [{ type: connector.Schema.Types.ObjectId, ref: "Faculty", required: "true" }],
12+
13+
};
14+
const Organization = new connector.model("Organization", organizationSchema);

0 commit comments

Comments
 (0)