Skip to content

Commit e21fbfd

Browse files
authored
added array for infra and accreditation
1 parent b9f2c11 commit e21fbfd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

models/department.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ const departmentSchema = {
44
name: { type: Number, required: true },
55
acronym: { type: String, required: true, immutable: true },
66
yearOfStarting: { type: Date, immutable: true, required: true },
7-
accreditations: {
7+
accreditations: [{
88
type: connector.Schema.Types.ObjectId,
99
ref: 'Accreditation',
1010
required: true,
11-
},
12-
infrastructures: {
11+
}],
12+
infrastructures: [{
1313
type: connector.Schema.Types.ObjectId,
1414
ref: 'Infrastructure',
1515
required: true,
16-
},
16+
}],
1717
};
1818

1919
const Department = connector.model('Department', departmentSchema);

0 commit comments

Comments
 (0)