@api-client/core 0.18.21 → 0.18.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/modeling/helpers/Intelisense.d.ts +1 -0
- package/build/src/modeling/helpers/Intelisense.d.ts.map +1 -1
- package/build/src/modeling/helpers/Intelisense.js +1 -0
- package/build/src/modeling/helpers/Intelisense.js.map +1 -1
- package/build/src/modeling/templates/index.d.ts +1 -0
- package/build/src/modeling/templates/index.d.ts.map +1 -1
- package/build/src/modeling/templates/index.js +2 -0
- package/build/src/modeling/templates/index.js.map +1 -1
- package/build/src/modeling/templates/meta/education-management-platform.json +1 -0
- package/build/src/modeling/templates/meta/financial-services-platform.json +1 -0
- package/build/src/modeling/templates/meta/gaming-platform.json +1 -0
- package/build/src/modeling/templates/meta/healthcare-management-platform.json +1 -0
- package/build/src/modeling/templates/meta/hospitality-platform.json +1 -0
- package/build/src/modeling/templates/meta/index.d.ts +2 -2
- package/build/src/modeling/templates/meta/index.d.ts.map +1 -1
- package/build/src/modeling/templates/meta/index.js +31 -1
- package/build/src/modeling/templates/meta/index.js.map +1 -1
- package/build/src/modeling/templates/meta/iot-smart-home-platform.json +1 -0
- package/build/src/modeling/templates/meta/legal-services-platform.json +1 -0
- package/build/src/modeling/templates/meta/manufacturing-platform.json +1 -0
- package/build/src/modeling/templates/meta/non-profit-platform.json +1 -0
- package/build/src/modeling/templates/meta/real-estate-management-platform.json +1 -0
- package/build/src/modeling/templates/template-registry.d.ts +14 -0
- package/build/src/modeling/templates/template-registry.d.ts.map +1 -1
- package/build/src/modeling/templates/template-registry.js +63 -0
- package/build/src/modeling/templates/template-registry.js.map +1 -1
- package/build/src/modeling/templates/{ecommerce-domain.d.ts → verticals/business-services/ecommerce-domain.d.ts} +2 -2
- package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/{ecommerce-domain.js → verticals/business-services/ecommerce-domain.js} +6 -6
- package/build/src/modeling/templates/verticals/business-services/ecommerce-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js +744 -0
- package/build/src/modeling/templates/verticals/business-services/financial-services-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.d.ts +45 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.js +797 -0
- package/build/src/modeling/templates/verticals/business-services/hospitality-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/index.d.ts +21 -0
- package/build/src/modeling/templates/verticals/business-services/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/index.js +50 -0
- package/build/src/modeling/templates/verticals/business-services/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.d.ts +46 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.js +837 -0
- package/build/src/modeling/templates/verticals/business-services/legal-services-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.js +725 -0
- package/build/src/modeling/templates/verticals/education-training/education-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/education-training/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/education-training/index.js +21 -0
- package/build/src/modeling/templates/verticals/education-training/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.js +859 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.js +21 -0
- package/build/src/modeling/templates/verticals/healthcare-life-sciences/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/index.d.ts +79 -0
- package/build/src/modeling/templates/verticals/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/index.js +186 -0
- package/build/src/modeling/templates/verticals/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.js +22 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.d.ts +45 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.js +710 -0
- package/build/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/public-sector/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/index.js +22 -0
- package/build/src/modeling/templates/verticals/public-sector/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.d.ts +47 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.js +864 -0
- package/build/src/modeling/templates/verticals/public-sector/non-profit-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.d.ts +18 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.js +21 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.d.ts +40 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.js +727 -0
- package/build/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.js.map +1 -0
- package/build/src/modeling/templates/{blog-domain.d.ts → verticals/technology-media/blog-domain.d.ts} +2 -2
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/{blog-domain.js → verticals/technology-media/blog-domain.js} +5 -5
- package/build/src/modeling/templates/verticals/technology-media/blog-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.d.ts +46 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.js +1033 -0
- package/build/src/modeling/templates/verticals/technology-media/gaming-domain.js.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/index.d.ts +21 -0
- package/build/src/modeling/templates/verticals/technology-media/index.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/index.js +42 -0
- package/build/src/modeling/templates/verticals/technology-media/index.js.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts +47 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.d.ts.map +1 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js +1027 -0
- package/build/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/modeling/helpers/Intelisense.ts +1 -0
- package/src/modeling/templates/meta/education-management-platform.json +1 -0
- package/src/modeling/templates/meta/financial-services-platform.json +1 -0
- package/src/modeling/templates/meta/gaming-platform.json +1 -0
- package/src/modeling/templates/meta/healthcare-management-platform.json +1 -0
- package/src/modeling/templates/meta/hospitality-platform.json +1 -0
- package/src/modeling/templates/meta/iot-smart-home-platform.json +1 -0
- package/src/modeling/templates/meta/legal-services-platform.json +1 -0
- package/src/modeling/templates/meta/manufacturing-platform.json +1 -0
- package/src/modeling/templates/meta/non-profit-platform.json +1 -0
- package/src/modeling/templates/meta/real-estate-management-platform.json +1 -0
- package/src/modeling/templates/readme.md +14 -0
- package/src/modeling/templates/template-registry.ts +73 -0
- package/src/modeling/templates/verticals/README.md +122 -0
- package/src/modeling/templates/{ecommerce-domain.ts → verticals/business-services/ecommerce-domain.ts} +7 -7
- package/src/modeling/templates/verticals/business-services/financial-services-domain.ts +943 -0
- package/src/modeling/templates/verticals/business-services/hospitality-domain.ts +994 -0
- package/src/modeling/templates/verticals/business-services/legal-services-domain.ts +1059 -0
- package/src/modeling/templates/verticals/education-training/education-domain.ts +922 -0
- package/src/modeling/templates/verticals/healthcare-life-sciences/healthcare-domain.ts +1111 -0
- package/src/modeling/templates/verticals/manufacturing-logistics/manufacturing-domain.ts +895 -0
- package/src/modeling/templates/verticals/public-sector/non-profit-domain.ts +1109 -0
- package/src/modeling/templates/verticals/real-estate-construction/real-estate-domain.ts +944 -0
- package/src/modeling/templates/{blog-domain.ts → verticals/technology-media/blog-domain.ts} +6 -6
- package/src/modeling/templates/verticals/technology-media/gaming-domain.ts +1290 -0
- package/src/modeling/templates/verticals/technology-media/iot-smart-home-domain.ts +1287 -0
- package/build/src/modeling/templates/blog-domain.d.ts.map +0 -1
- package/build/src/modeling/templates/blog-domain.js.map +0 -1
- package/build/src/modeling/templates/ecommerce-domain.d.ts.map +0 -1
- package/build/src/modeling/templates/ecommerce-domain.js.map +0 -1
|
@@ -0,0 +1,922 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Education Data Domain Example
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to create a comprehensive education data domain
|
|
5
|
+
* using the API Client Core modeling system. It follows the business-first approach
|
|
6
|
+
* and demonstrates proper use of namespaces, models, entities, properties,
|
|
7
|
+
* associations, and semantic annotations.
|
|
8
|
+
*
|
|
9
|
+
* The example includes:
|
|
10
|
+
* - Student Management with student records, enrollment, and academic history
|
|
11
|
+
* - Course Management with courses, curriculum, assignments, and grades
|
|
12
|
+
* - Faculty Management with teachers, staff, departments, and roles
|
|
13
|
+
* - Campus Operations with facilities, events, and resources
|
|
14
|
+
* - Learning Analytics with progress tracking, assessments, and performance
|
|
15
|
+
* - Administrative features with admissions, financial aid, and scheduling
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { createEducationDomain } from './education-domain.js'
|
|
20
|
+
*
|
|
21
|
+
* const domain = createEducationDomain()
|
|
22
|
+
* console.log('Education domain created with', domain.graph.nodeCount(), 'nodes')
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { DataDomain } from '../../../DataDomain.js'
|
|
27
|
+
import {
|
|
28
|
+
addIdField,
|
|
29
|
+
addNameField,
|
|
30
|
+
addDescriptionField,
|
|
31
|
+
addEmailField,
|
|
32
|
+
addFirstNameField,
|
|
33
|
+
addLastNameField,
|
|
34
|
+
addPhoneField,
|
|
35
|
+
addCustomStatusField,
|
|
36
|
+
addCreatedAtField,
|
|
37
|
+
addUpdatedAtField,
|
|
38
|
+
addCurrencyAmountField,
|
|
39
|
+
} from '../../../helpers/Intelisense.js'
|
|
40
|
+
import type { CreateTemplateOptions } from '../../types.js'
|
|
41
|
+
|
|
42
|
+
function createDomain(): DataDomain {
|
|
43
|
+
return new DataDomain({
|
|
44
|
+
info: {
|
|
45
|
+
name: 'Education Management Platform',
|
|
46
|
+
displayName: 'Education Management Platform',
|
|
47
|
+
description:
|
|
48
|
+
'A comprehensive education management platform with student management, course management, ' +
|
|
49
|
+
'faculty management, campus operations, and learning analytics',
|
|
50
|
+
},
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Creates a comprehensive education data domain following domain-driven design principles.
|
|
56
|
+
*
|
|
57
|
+
* This function demonstrates the proper hierarchy and organization for an education platform:
|
|
58
|
+
* 1. Creates the root DataDomain for the education platform
|
|
59
|
+
* 2. Organizes functionality into logical namespaces (Student Management, Course Management, etc.)
|
|
60
|
+
* 3. Groups related entities into models within each namespace
|
|
61
|
+
* 4. Defines entities with proper semantic annotations for educational workflows
|
|
62
|
+
* 5. Establishes associations with appropriate cardinality for student-course relationships
|
|
63
|
+
*
|
|
64
|
+
* @returns A fully configured DataDomain with all education entities and relationships
|
|
65
|
+
*/
|
|
66
|
+
export default function createEducationDomain(options: CreateTemplateOptions = {}): DataDomain {
|
|
67
|
+
// Ensure the root data domain
|
|
68
|
+
const domain = options.domain ?? createDomain()
|
|
69
|
+
|
|
70
|
+
//
|
|
71
|
+
// 1. STUDENT MANAGEMENT NAMESPACE
|
|
72
|
+
//
|
|
73
|
+
const studentManagement = domain.addNamespace({
|
|
74
|
+
info: {
|
|
75
|
+
name: 'StudentManagement',
|
|
76
|
+
displayName: 'Student Management',
|
|
77
|
+
description: 'Student records, enrollment, and academic history',
|
|
78
|
+
},
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// Student Model
|
|
82
|
+
const studentModel = studentManagement.addModel({
|
|
83
|
+
info: {
|
|
84
|
+
name: 'Students',
|
|
85
|
+
displayName: 'Student Management',
|
|
86
|
+
description: 'Student records and information',
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
// Student Entity
|
|
91
|
+
const studentEntity = studentModel.addEntity({
|
|
92
|
+
info: {
|
|
93
|
+
name: 'student',
|
|
94
|
+
displayName: 'Student',
|
|
95
|
+
description: 'Student record with academic information',
|
|
96
|
+
},
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
addIdField(studentEntity, { displayName: 'Student ID', description: 'Unique identifier for the student' })
|
|
100
|
+
|
|
101
|
+
studentEntity.addProperty({
|
|
102
|
+
info: { name: 'student_number', displayName: 'Student Number', description: 'Student identification number' },
|
|
103
|
+
type: 'string',
|
|
104
|
+
required: true,
|
|
105
|
+
unique: true,
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
addFirstNameField(studentEntity, { description: 'Student first name' })
|
|
109
|
+
addLastNameField(studentEntity, { description: 'Student last name' })
|
|
110
|
+
|
|
111
|
+
studentEntity.addProperty({
|
|
112
|
+
info: { name: 'date_of_birth', displayName: 'Date of Birth', description: 'Student date of birth' },
|
|
113
|
+
type: 'date',
|
|
114
|
+
required: true,
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
addEmailField(studentEntity, { description: 'Student email address' })
|
|
118
|
+
addPhoneField(studentEntity, { description: 'Student phone number' })
|
|
119
|
+
|
|
120
|
+
studentEntity.addProperty({
|
|
121
|
+
info: { name: 'address', displayName: 'Address', description: 'Student residential address' },
|
|
122
|
+
type: 'string',
|
|
123
|
+
required: true,
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
studentEntity.addProperty({
|
|
127
|
+
info: {
|
|
128
|
+
name: 'emergency_contact_name',
|
|
129
|
+
displayName: 'Emergency Contact Name',
|
|
130
|
+
description: 'Emergency contact name',
|
|
131
|
+
},
|
|
132
|
+
type: 'string',
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
addPhoneField(studentEntity, {
|
|
136
|
+
name: 'emergency_contact_phone',
|
|
137
|
+
displayName: 'Emergency Contact Phone',
|
|
138
|
+
description: 'Emergency contact phone number',
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
addCustomStatusField(studentEntity, ['active', 'inactive', 'graduated', 'withdrawn', 'suspended'], {
|
|
142
|
+
displayName: 'Student Status',
|
|
143
|
+
description: 'Current status of the student',
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
studentEntity.addProperty({
|
|
147
|
+
info: {
|
|
148
|
+
name: 'academic_level',
|
|
149
|
+
displayName: 'Academic Level',
|
|
150
|
+
description: 'Current academic level of the student',
|
|
151
|
+
},
|
|
152
|
+
type: 'string',
|
|
153
|
+
required: true,
|
|
154
|
+
schema: {
|
|
155
|
+
enum: ['freshman', 'sophomore', 'junior', 'senior', 'graduate'],
|
|
156
|
+
},
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
addCreatedAtField(studentEntity, { description: 'When the student record was created' })
|
|
160
|
+
addUpdatedAtField(studentEntity, { description: 'When the student record was last updated' })
|
|
161
|
+
|
|
162
|
+
// Enrollment Entity
|
|
163
|
+
const enrollmentEntity = studentModel.addEntity({
|
|
164
|
+
info: {
|
|
165
|
+
name: 'enrollment',
|
|
166
|
+
displayName: 'Enrollment',
|
|
167
|
+
description: 'Student course enrollment records',
|
|
168
|
+
},
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
addIdField(enrollmentEntity, { displayName: 'Enrollment ID', description: 'Unique identifier for the enrollment' })
|
|
172
|
+
|
|
173
|
+
enrollmentEntity.addProperty({
|
|
174
|
+
info: { name: 'enrollment_date', displayName: 'Enrollment Date', description: 'Date when student enrolled' },
|
|
175
|
+
type: 'date',
|
|
176
|
+
required: true,
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
addCustomStatusField(enrollmentEntity, ['enrolled', 'dropped', 'completed', 'incomplete'], {
|
|
180
|
+
displayName: 'Enrollment Status',
|
|
181
|
+
description: 'Current status of the enrollment',
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
addCreatedAtField(enrollmentEntity, { description: 'When the enrollment was created' })
|
|
185
|
+
|
|
186
|
+
// Enrollment-Student Association (Many-to-One)
|
|
187
|
+
enrollmentEntity.addAssociation(
|
|
188
|
+
{ key: studentEntity.key },
|
|
189
|
+
{
|
|
190
|
+
info: { name: 'student', displayName: 'Student', description: 'Student for this enrollment' },
|
|
191
|
+
required: true,
|
|
192
|
+
multiple: false,
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
// Academic History Entity
|
|
197
|
+
const academicHistoryEntity = studentModel.addEntity({
|
|
198
|
+
info: {
|
|
199
|
+
name: 'academic_history',
|
|
200
|
+
displayName: 'Academic History',
|
|
201
|
+
description: 'Student academic history and records',
|
|
202
|
+
},
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
addIdField(academicHistoryEntity, {
|
|
206
|
+
displayName: 'History ID',
|
|
207
|
+
description: 'Unique identifier for the academic history',
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
academicHistoryEntity.addProperty({
|
|
211
|
+
info: { name: 'gpa', displayName: 'GPA', description: 'Grade Point Average' },
|
|
212
|
+
type: 'number',
|
|
213
|
+
required: true,
|
|
214
|
+
schema: {
|
|
215
|
+
minimum: 0,
|
|
216
|
+
maximum: 4,
|
|
217
|
+
},
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
academicHistoryEntity.addProperty({
|
|
221
|
+
info: { name: 'credits_earned', displayName: 'Credits Earned', description: 'Total credits earned' },
|
|
222
|
+
type: 'number',
|
|
223
|
+
required: true,
|
|
224
|
+
schema: {
|
|
225
|
+
minimum: 0,
|
|
226
|
+
},
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
academicHistoryEntity.addProperty({
|
|
230
|
+
info: { name: 'academic_year', displayName: 'Academic Year', description: 'Academic year' },
|
|
231
|
+
type: 'string',
|
|
232
|
+
required: true,
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
addDescriptionField(academicHistoryEntity, { description: 'Academic history notes and achievements' })
|
|
236
|
+
|
|
237
|
+
addCreatedAtField(academicHistoryEntity, { description: 'When the academic history was created' })
|
|
238
|
+
|
|
239
|
+
// AcademicHistory-Student Association (Many-to-One)
|
|
240
|
+
academicHistoryEntity.addAssociation(
|
|
241
|
+
{ key: studentEntity.key },
|
|
242
|
+
{
|
|
243
|
+
info: { name: 'student', displayName: 'Student', description: 'Student for this academic history' },
|
|
244
|
+
required: true,
|
|
245
|
+
multiple: false,
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
//
|
|
250
|
+
// 2. COURSE MANAGEMENT NAMESPACE
|
|
251
|
+
//
|
|
252
|
+
const courseManagement = domain.addNamespace({
|
|
253
|
+
info: {
|
|
254
|
+
name: 'CourseManagement',
|
|
255
|
+
displayName: 'Course Management',
|
|
256
|
+
description: 'Courses, curriculum, assignments, and grades',
|
|
257
|
+
},
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
// Course Model
|
|
261
|
+
const courseModel = courseManagement.addModel({
|
|
262
|
+
info: {
|
|
263
|
+
name: 'Courses',
|
|
264
|
+
displayName: 'Course Management',
|
|
265
|
+
description: 'Course information and curriculum',
|
|
266
|
+
},
|
|
267
|
+
})
|
|
268
|
+
|
|
269
|
+
// Course Entity
|
|
270
|
+
const courseEntity = courseModel.addEntity({
|
|
271
|
+
info: {
|
|
272
|
+
name: 'course',
|
|
273
|
+
displayName: 'Course',
|
|
274
|
+
description: 'Academic course information',
|
|
275
|
+
},
|
|
276
|
+
})
|
|
277
|
+
|
|
278
|
+
addIdField(courseEntity, { displayName: 'Course ID', description: 'Unique identifier for the course' })
|
|
279
|
+
|
|
280
|
+
courseEntity.addProperty({
|
|
281
|
+
info: { name: 'course_code', displayName: 'Course Code', description: 'Course identification code' },
|
|
282
|
+
type: 'string',
|
|
283
|
+
required: true,
|
|
284
|
+
unique: true,
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
addNameField(courseEntity, { displayName: 'Course Name', description: 'Name of the course' })
|
|
288
|
+
|
|
289
|
+
addDescriptionField(courseEntity, { description: 'Course description and objectives' })
|
|
290
|
+
|
|
291
|
+
courseEntity.addProperty({
|
|
292
|
+
info: { name: 'credits', displayName: 'Credits', description: 'Number of credits for the course' },
|
|
293
|
+
type: 'number',
|
|
294
|
+
required: true,
|
|
295
|
+
schema: {
|
|
296
|
+
minimum: 1,
|
|
297
|
+
maximum: 6,
|
|
298
|
+
},
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
addCustomStatusField(courseEntity, ['active', 'inactive', 'archived'], {
|
|
302
|
+
displayName: 'Course Status',
|
|
303
|
+
description: 'Current status of the course',
|
|
304
|
+
})
|
|
305
|
+
|
|
306
|
+
addCreatedAtField(courseEntity, { description: 'When the course was created' })
|
|
307
|
+
addUpdatedAtField(courseEntity, { description: 'When the course was last updated' })
|
|
308
|
+
|
|
309
|
+
// Course Section Entity
|
|
310
|
+
const courseSectionEntity = courseModel.addEntity({
|
|
311
|
+
info: {
|
|
312
|
+
name: 'course_section',
|
|
313
|
+
displayName: 'Course Section',
|
|
314
|
+
description: 'Specific section of a course',
|
|
315
|
+
},
|
|
316
|
+
})
|
|
317
|
+
|
|
318
|
+
addIdField(courseSectionEntity, { displayName: 'Section ID', description: 'Unique identifier for the section' })
|
|
319
|
+
|
|
320
|
+
courseSectionEntity.addProperty({
|
|
321
|
+
info: { name: 'section_number', displayName: 'Section Number', description: 'Section number' },
|
|
322
|
+
type: 'string',
|
|
323
|
+
required: true,
|
|
324
|
+
})
|
|
325
|
+
|
|
326
|
+
courseSectionEntity.addProperty({
|
|
327
|
+
info: { name: 'capacity', displayName: 'Capacity', description: 'Maximum number of students' },
|
|
328
|
+
type: 'number',
|
|
329
|
+
required: true,
|
|
330
|
+
schema: {
|
|
331
|
+
minimum: 1,
|
|
332
|
+
},
|
|
333
|
+
})
|
|
334
|
+
|
|
335
|
+
courseSectionEntity.addProperty({
|
|
336
|
+
info: { name: 'enrolled_count', displayName: 'Enrolled Count', description: 'Number of enrolled students' },
|
|
337
|
+
type: 'number',
|
|
338
|
+
required: true,
|
|
339
|
+
schema: {
|
|
340
|
+
minimum: 0,
|
|
341
|
+
},
|
|
342
|
+
})
|
|
343
|
+
|
|
344
|
+
addCustomStatusField(courseSectionEntity, ['open', 'full', 'closed', 'cancelled'], {
|
|
345
|
+
displayName: 'Section Status',
|
|
346
|
+
description: 'Current status of the section',
|
|
347
|
+
})
|
|
348
|
+
|
|
349
|
+
addCreatedAtField(courseSectionEntity, { description: 'When the section was created' })
|
|
350
|
+
|
|
351
|
+
// CourseSection-Course Association (Many-to-One)
|
|
352
|
+
courseSectionEntity.addAssociation(
|
|
353
|
+
{ key: courseEntity.key },
|
|
354
|
+
{
|
|
355
|
+
info: { name: 'course', displayName: 'Course', description: 'Course for this section' },
|
|
356
|
+
required: true,
|
|
357
|
+
multiple: false,
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
// Assignment Entity
|
|
362
|
+
const assignmentEntity = courseModel.addEntity({
|
|
363
|
+
info: {
|
|
364
|
+
name: 'assignment',
|
|
365
|
+
displayName: 'Assignment',
|
|
366
|
+
description: 'Course assignments and assessments',
|
|
367
|
+
},
|
|
368
|
+
})
|
|
369
|
+
|
|
370
|
+
addIdField(assignmentEntity, { displayName: 'Assignment ID', description: 'Unique identifier for the assignment' })
|
|
371
|
+
|
|
372
|
+
addNameField(assignmentEntity, { displayName: 'Assignment Name', description: 'Name of the assignment' })
|
|
373
|
+
|
|
374
|
+
addDescriptionField(assignmentEntity, { description: 'Assignment description and requirements' })
|
|
375
|
+
|
|
376
|
+
assignmentEntity.addProperty({
|
|
377
|
+
info: { name: 'due_date', displayName: 'Due Date', description: 'Assignment due date' },
|
|
378
|
+
type: 'date',
|
|
379
|
+
required: true,
|
|
380
|
+
})
|
|
381
|
+
|
|
382
|
+
assignmentEntity.addProperty({
|
|
383
|
+
info: { name: 'total_points', displayName: 'Total Points', description: 'Total possible points' },
|
|
384
|
+
type: 'number',
|
|
385
|
+
required: true,
|
|
386
|
+
schema: {
|
|
387
|
+
minimum: 1,
|
|
388
|
+
},
|
|
389
|
+
})
|
|
390
|
+
|
|
391
|
+
addCustomStatusField(assignmentEntity, ['draft', 'published', 'submitted', 'graded'], {
|
|
392
|
+
displayName: 'Assignment Status',
|
|
393
|
+
description: 'Current status of the assignment',
|
|
394
|
+
})
|
|
395
|
+
|
|
396
|
+
addCreatedAtField(assignmentEntity, { description: 'When the assignment was created' })
|
|
397
|
+
|
|
398
|
+
// Assignment-CourseSection Association (Many-to-One)
|
|
399
|
+
assignmentEntity.addAssociation(
|
|
400
|
+
{ key: courseSectionEntity.key },
|
|
401
|
+
{
|
|
402
|
+
info: {
|
|
403
|
+
name: 'course_section',
|
|
404
|
+
displayName: 'Course Section',
|
|
405
|
+
description: 'Course section for this assignment',
|
|
406
|
+
},
|
|
407
|
+
required: true,
|
|
408
|
+
multiple: false,
|
|
409
|
+
}
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
// Grade Entity
|
|
413
|
+
const gradeEntity = courseModel.addEntity({
|
|
414
|
+
info: {
|
|
415
|
+
name: 'grade',
|
|
416
|
+
displayName: 'Grade',
|
|
417
|
+
description: 'Student grades and assessments',
|
|
418
|
+
},
|
|
419
|
+
})
|
|
420
|
+
|
|
421
|
+
addIdField(gradeEntity, { displayName: 'Grade ID', description: 'Unique identifier for the grade' })
|
|
422
|
+
|
|
423
|
+
gradeEntity.addProperty({
|
|
424
|
+
info: { name: 'score', displayName: 'Score', description: 'Numerical score earned' },
|
|
425
|
+
type: 'number',
|
|
426
|
+
required: true,
|
|
427
|
+
schema: {
|
|
428
|
+
minimum: 0,
|
|
429
|
+
},
|
|
430
|
+
})
|
|
431
|
+
|
|
432
|
+
gradeEntity.addProperty({
|
|
433
|
+
info: { name: 'letter_grade', displayName: 'Letter Grade', description: 'Letter grade (A, B, C, D, F)' },
|
|
434
|
+
type: 'string',
|
|
435
|
+
required: true,
|
|
436
|
+
schema: {
|
|
437
|
+
enum: ['A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'C-', 'D+', 'D', 'F'],
|
|
438
|
+
},
|
|
439
|
+
})
|
|
440
|
+
|
|
441
|
+
addDescriptionField(gradeEntity, { description: 'Grade comments and feedback' })
|
|
442
|
+
|
|
443
|
+
addCreatedAtField(gradeEntity, { description: 'When the grade was created' })
|
|
444
|
+
|
|
445
|
+
// Grade-Student Association (Many-to-One)
|
|
446
|
+
gradeEntity.addAssociation(
|
|
447
|
+
{ key: studentEntity.key },
|
|
448
|
+
{
|
|
449
|
+
info: { name: 'student', displayName: 'Student', description: 'Student for this grade' },
|
|
450
|
+
required: true,
|
|
451
|
+
multiple: false,
|
|
452
|
+
}
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
// Grade-Assignment Association (Many-to-One)
|
|
456
|
+
gradeEntity.addAssociation(
|
|
457
|
+
{ key: assignmentEntity.key },
|
|
458
|
+
{
|
|
459
|
+
info: { name: 'assignment', displayName: 'Assignment', description: 'Assignment for this grade' },
|
|
460
|
+
required: true,
|
|
461
|
+
multiple: false,
|
|
462
|
+
}
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
// Enrollment-CourseSection Association (Many-to-One)
|
|
466
|
+
enrollmentEntity.addAssociation(
|
|
467
|
+
{ key: courseSectionEntity.key },
|
|
468
|
+
{
|
|
469
|
+
info: {
|
|
470
|
+
name: 'course_section',
|
|
471
|
+
displayName: 'Course Section',
|
|
472
|
+
description: 'Course section for this enrollment',
|
|
473
|
+
},
|
|
474
|
+
required: true,
|
|
475
|
+
multiple: false,
|
|
476
|
+
}
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
//
|
|
480
|
+
// 3. FACULTY MANAGEMENT NAMESPACE
|
|
481
|
+
//
|
|
482
|
+
const facultyManagement = domain.addNamespace({
|
|
483
|
+
info: {
|
|
484
|
+
name: 'FacultyManagement',
|
|
485
|
+
displayName: 'Faculty Management',
|
|
486
|
+
description: 'Teachers, staff, departments, and roles',
|
|
487
|
+
},
|
|
488
|
+
})
|
|
489
|
+
|
|
490
|
+
// Faculty Model
|
|
491
|
+
const facultyModel = facultyManagement.addModel({
|
|
492
|
+
info: {
|
|
493
|
+
name: 'Faculty',
|
|
494
|
+
displayName: 'Faculty Management',
|
|
495
|
+
description: 'Faculty and staff information',
|
|
496
|
+
},
|
|
497
|
+
})
|
|
498
|
+
|
|
499
|
+
// Faculty Entity
|
|
500
|
+
const facultyEntity = facultyModel.addEntity({
|
|
501
|
+
info: {
|
|
502
|
+
name: 'faculty',
|
|
503
|
+
displayName: 'Faculty Member',
|
|
504
|
+
description: 'Faculty member or staff',
|
|
505
|
+
},
|
|
506
|
+
})
|
|
507
|
+
|
|
508
|
+
addIdField(facultyEntity, { displayName: 'Faculty ID', description: 'Unique identifier for the faculty member' })
|
|
509
|
+
|
|
510
|
+
addFirstNameField(facultyEntity, { description: 'Faculty first name' })
|
|
511
|
+
addLastNameField(facultyEntity, { description: 'Faculty last name' })
|
|
512
|
+
|
|
513
|
+
addEmailField(facultyEntity, { description: 'Faculty email address' })
|
|
514
|
+
addPhoneField(facultyEntity, { description: 'Faculty phone number' })
|
|
515
|
+
|
|
516
|
+
addCustomStatusField(facultyEntity, ['active', 'inactive', 'on_leave', 'retired'], {
|
|
517
|
+
displayName: 'Faculty Status',
|
|
518
|
+
description: 'Current status of the faculty member',
|
|
519
|
+
})
|
|
520
|
+
|
|
521
|
+
facultyEntity.addProperty({
|
|
522
|
+
info: {
|
|
523
|
+
name: 'faculty_rank',
|
|
524
|
+
displayName: 'Faculty Rank',
|
|
525
|
+
description: 'Academic rank of the faculty member',
|
|
526
|
+
},
|
|
527
|
+
type: 'string',
|
|
528
|
+
required: true,
|
|
529
|
+
schema: {
|
|
530
|
+
enum: ['professor', 'associate_professor', 'assistant_professor', 'lecturer', 'instructor'],
|
|
531
|
+
},
|
|
532
|
+
})
|
|
533
|
+
|
|
534
|
+
addCreatedAtField(facultyEntity, { description: 'When the faculty record was created' })
|
|
535
|
+
addUpdatedAtField(facultyEntity, { description: 'When the faculty record was last updated' })
|
|
536
|
+
|
|
537
|
+
// Department Entity
|
|
538
|
+
const departmentEntity = facultyModel.addEntity({
|
|
539
|
+
info: {
|
|
540
|
+
name: 'department',
|
|
541
|
+
displayName: 'Department',
|
|
542
|
+
description: 'Academic department',
|
|
543
|
+
},
|
|
544
|
+
})
|
|
545
|
+
|
|
546
|
+
addIdField(departmentEntity, { displayName: 'Department ID', description: 'Unique identifier for the department' })
|
|
547
|
+
|
|
548
|
+
addNameField(departmentEntity, { displayName: 'Department Name', description: 'Name of the department' })
|
|
549
|
+
|
|
550
|
+
addDescriptionField(departmentEntity, { description: 'Department description and mission' })
|
|
551
|
+
|
|
552
|
+
addCustomStatusField(departmentEntity, ['active', 'inactive', 'merged'], {
|
|
553
|
+
displayName: 'Department Status',
|
|
554
|
+
description: 'Current status of the department',
|
|
555
|
+
})
|
|
556
|
+
|
|
557
|
+
addCreatedAtField(departmentEntity, { description: 'When the department was created' })
|
|
558
|
+
|
|
559
|
+
// Faculty-Department Association (Many-to-One)
|
|
560
|
+
facultyEntity.addAssociation(
|
|
561
|
+
{ key: departmentEntity.key },
|
|
562
|
+
{
|
|
563
|
+
info: { name: 'department', displayName: 'Department', description: 'Department for this faculty member' },
|
|
564
|
+
required: true,
|
|
565
|
+
multiple: false,
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
// CourseSection-Faculty Association (Many-to-One)
|
|
570
|
+
courseSectionEntity.addAssociation(
|
|
571
|
+
{ key: facultyEntity.key },
|
|
572
|
+
{
|
|
573
|
+
info: { name: 'instructor', displayName: 'Instructor', description: 'Faculty instructor for this section' },
|
|
574
|
+
required: true,
|
|
575
|
+
multiple: false,
|
|
576
|
+
}
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
//
|
|
580
|
+
// 4. CAMPUS OPERATIONS NAMESPACE
|
|
581
|
+
//
|
|
582
|
+
const campusOperations = domain.addNamespace({
|
|
583
|
+
info: {
|
|
584
|
+
name: 'CampusOperations',
|
|
585
|
+
displayName: 'Campus Operations',
|
|
586
|
+
description: 'Facilities, events, and resources',
|
|
587
|
+
},
|
|
588
|
+
})
|
|
589
|
+
|
|
590
|
+
// Campus Model
|
|
591
|
+
const campusModel = campusOperations.addModel({
|
|
592
|
+
info: {
|
|
593
|
+
name: 'Campus',
|
|
594
|
+
displayName: 'Campus Management',
|
|
595
|
+
description: 'Campus facilities and operations',
|
|
596
|
+
},
|
|
597
|
+
})
|
|
598
|
+
|
|
599
|
+
// Facility Entity
|
|
600
|
+
const facilityEntity = campusModel.addEntity({
|
|
601
|
+
info: {
|
|
602
|
+
name: 'facility',
|
|
603
|
+
displayName: 'Facility',
|
|
604
|
+
description: 'Campus facilities and buildings',
|
|
605
|
+
},
|
|
606
|
+
})
|
|
607
|
+
|
|
608
|
+
addIdField(facilityEntity, { displayName: 'Facility ID', description: 'Unique identifier for the facility' })
|
|
609
|
+
|
|
610
|
+
addNameField(facilityEntity, { displayName: 'Facility Name', description: 'Name of the facility' })
|
|
611
|
+
|
|
612
|
+
addDescriptionField(facilityEntity, { description: 'Facility description and features' })
|
|
613
|
+
|
|
614
|
+
facilityEntity.addProperty({
|
|
615
|
+
info: {
|
|
616
|
+
name: 'facility_type',
|
|
617
|
+
displayName: 'Facility Type',
|
|
618
|
+
description: 'Type of campus facility',
|
|
619
|
+
},
|
|
620
|
+
type: 'string',
|
|
621
|
+
required: true,
|
|
622
|
+
schema: {
|
|
623
|
+
enum: ['classroom', 'laboratory', 'office', 'library', 'gymnasium', 'auditorium'],
|
|
624
|
+
},
|
|
625
|
+
})
|
|
626
|
+
|
|
627
|
+
addCustomStatusField(facilityEntity, ['active', 'maintenance', 'closed'], {
|
|
628
|
+
displayName: 'Facility Status',
|
|
629
|
+
description: 'Current status of the facility',
|
|
630
|
+
})
|
|
631
|
+
|
|
632
|
+
addCreatedAtField(facilityEntity, { description: 'When the facility was created' })
|
|
633
|
+
|
|
634
|
+
// Event Entity
|
|
635
|
+
const eventEntity = campusModel.addEntity({
|
|
636
|
+
info: {
|
|
637
|
+
name: 'event',
|
|
638
|
+
displayName: 'Event',
|
|
639
|
+
description: 'Campus events and activities',
|
|
640
|
+
},
|
|
641
|
+
})
|
|
642
|
+
|
|
643
|
+
addIdField(eventEntity, { displayName: 'Event ID', description: 'Unique identifier for the event' })
|
|
644
|
+
|
|
645
|
+
addNameField(eventEntity, { displayName: 'Event Name', description: 'Name of the event' })
|
|
646
|
+
|
|
647
|
+
addDescriptionField(eventEntity, { description: 'Event description and details' })
|
|
648
|
+
|
|
649
|
+
eventEntity.addProperty({
|
|
650
|
+
info: { name: 'start_date', displayName: 'Start Date', description: 'Event start date and time' },
|
|
651
|
+
type: 'datetime',
|
|
652
|
+
required: true,
|
|
653
|
+
})
|
|
654
|
+
|
|
655
|
+
eventEntity.addProperty({
|
|
656
|
+
info: { name: 'end_date', displayName: 'End Date', description: 'Event end date and time' },
|
|
657
|
+
type: 'datetime',
|
|
658
|
+
required: true,
|
|
659
|
+
})
|
|
660
|
+
|
|
661
|
+
addCustomStatusField(eventEntity, ['scheduled', 'in_progress', 'completed', 'cancelled'], {
|
|
662
|
+
displayName: 'Event Status',
|
|
663
|
+
description: 'Current status of the event',
|
|
664
|
+
})
|
|
665
|
+
|
|
666
|
+
addCreatedAtField(eventEntity, { description: 'When the event was created' })
|
|
667
|
+
|
|
668
|
+
// Event-Facility Association (Many-to-One)
|
|
669
|
+
eventEntity.addAssociation(
|
|
670
|
+
{ key: facilityEntity.key },
|
|
671
|
+
{
|
|
672
|
+
info: { name: 'facility', displayName: 'Facility', description: 'Facility for this event' },
|
|
673
|
+
required: true,
|
|
674
|
+
multiple: false,
|
|
675
|
+
}
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
//
|
|
679
|
+
// 5. LEARNING ANALYTICS NAMESPACE
|
|
680
|
+
//
|
|
681
|
+
const learningAnalytics = domain.addNamespace({
|
|
682
|
+
info: {
|
|
683
|
+
name: 'LearningAnalytics',
|
|
684
|
+
displayName: 'Learning Analytics',
|
|
685
|
+
description: 'Progress tracking, assessments, and performance',
|
|
686
|
+
},
|
|
687
|
+
})
|
|
688
|
+
|
|
689
|
+
// Analytics Model
|
|
690
|
+
const analyticsModel = learningAnalytics.addModel({
|
|
691
|
+
info: {
|
|
692
|
+
name: 'Analytics',
|
|
693
|
+
displayName: 'Learning Analytics',
|
|
694
|
+
description: 'Student performance and learning analytics',
|
|
695
|
+
},
|
|
696
|
+
})
|
|
697
|
+
|
|
698
|
+
// Assessment Entity
|
|
699
|
+
const assessmentEntity = analyticsModel.addEntity({
|
|
700
|
+
info: {
|
|
701
|
+
name: 'assessment',
|
|
702
|
+
displayName: 'Assessment',
|
|
703
|
+
description: 'Student assessments and evaluations',
|
|
704
|
+
},
|
|
705
|
+
})
|
|
706
|
+
|
|
707
|
+
addIdField(assessmentEntity, { displayName: 'Assessment ID', description: 'Unique identifier for the assessment' })
|
|
708
|
+
|
|
709
|
+
addNameField(assessmentEntity, { displayName: 'Assessment Name', description: 'Name of the assessment' })
|
|
710
|
+
|
|
711
|
+
addDescriptionField(assessmentEntity, { description: 'Assessment description and criteria' })
|
|
712
|
+
|
|
713
|
+
assessmentEntity.addProperty({
|
|
714
|
+
info: {
|
|
715
|
+
name: 'assessment_date',
|
|
716
|
+
displayName: 'Assessment Date',
|
|
717
|
+
description: 'Date when assessment was conducted',
|
|
718
|
+
},
|
|
719
|
+
type: 'date',
|
|
720
|
+
required: true,
|
|
721
|
+
})
|
|
722
|
+
|
|
723
|
+
assessmentEntity.addProperty({
|
|
724
|
+
info: { name: 'score', displayName: 'Score', description: 'Assessment score' },
|
|
725
|
+
type: 'number',
|
|
726
|
+
required: true,
|
|
727
|
+
schema: {
|
|
728
|
+
minimum: 0,
|
|
729
|
+
maximum: 100,
|
|
730
|
+
},
|
|
731
|
+
})
|
|
732
|
+
|
|
733
|
+
addCustomStatusField(assessmentEntity, ['excellent', 'good', 'satisfactory', 'needs_improvement', 'unsatisfactory'], {
|
|
734
|
+
displayName: 'Assessment Level',
|
|
735
|
+
description: 'Performance level of the assessment',
|
|
736
|
+
})
|
|
737
|
+
|
|
738
|
+
addCreatedAtField(assessmentEntity, { description: 'When the assessment was created' })
|
|
739
|
+
|
|
740
|
+
// Assessment-Student Association (Many-to-One)
|
|
741
|
+
assessmentEntity.addAssociation(
|
|
742
|
+
{ key: studentEntity.key },
|
|
743
|
+
{
|
|
744
|
+
info: { name: 'student', displayName: 'Student', description: 'Student for this assessment' },
|
|
745
|
+
required: true,
|
|
746
|
+
multiple: false,
|
|
747
|
+
}
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
// Progress Tracking Entity
|
|
751
|
+
const progressTrackingEntity = analyticsModel.addEntity({
|
|
752
|
+
info: {
|
|
753
|
+
name: 'progress_tracking',
|
|
754
|
+
displayName: 'Progress Tracking',
|
|
755
|
+
description: 'Student progress tracking and milestones',
|
|
756
|
+
},
|
|
757
|
+
})
|
|
758
|
+
|
|
759
|
+
addIdField(progressTrackingEntity, {
|
|
760
|
+
displayName: 'Progress ID',
|
|
761
|
+
description: 'Unique identifier for the progress record',
|
|
762
|
+
})
|
|
763
|
+
|
|
764
|
+
progressTrackingEntity.addProperty({
|
|
765
|
+
info: { name: 'tracking_date', displayName: 'Tracking Date', description: 'Date of progress tracking' },
|
|
766
|
+
type: 'date',
|
|
767
|
+
required: true,
|
|
768
|
+
})
|
|
769
|
+
|
|
770
|
+
progressTrackingEntity.addProperty({
|
|
771
|
+
info: {
|
|
772
|
+
name: 'completion_percentage',
|
|
773
|
+
displayName: 'Completion Percentage',
|
|
774
|
+
description: 'Percentage of course completed',
|
|
775
|
+
},
|
|
776
|
+
type: 'number',
|
|
777
|
+
required: true,
|
|
778
|
+
schema: {
|
|
779
|
+
minimum: 0,
|
|
780
|
+
maximum: 100,
|
|
781
|
+
},
|
|
782
|
+
})
|
|
783
|
+
|
|
784
|
+
addCustomStatusField(progressTrackingEntity, ['on_track', 'ahead', 'behind', 'at_risk'], {
|
|
785
|
+
displayName: 'Progress Status',
|
|
786
|
+
description: 'Current progress status',
|
|
787
|
+
})
|
|
788
|
+
|
|
789
|
+
addDescriptionField(progressTrackingEntity, { description: 'Progress notes and observations' })
|
|
790
|
+
|
|
791
|
+
addCreatedAtField(progressTrackingEntity, { description: 'When the progress record was created' })
|
|
792
|
+
|
|
793
|
+
// ProgressTracking-Student Association (Many-to-One)
|
|
794
|
+
progressTrackingEntity.addAssociation(
|
|
795
|
+
{ key: studentEntity.key },
|
|
796
|
+
{
|
|
797
|
+
info: { name: 'student', displayName: 'Student', description: 'Student for this progress tracking' },
|
|
798
|
+
required: true,
|
|
799
|
+
multiple: false,
|
|
800
|
+
}
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
// ProgressTracking-CourseSection Association (Many-to-One)
|
|
804
|
+
progressTrackingEntity.addAssociation(
|
|
805
|
+
{ key: courseSectionEntity.key },
|
|
806
|
+
{
|
|
807
|
+
info: { name: 'course_section', displayName: 'Course Section', description: 'Course section for this progress' },
|
|
808
|
+
required: true,
|
|
809
|
+
multiple: false,
|
|
810
|
+
}
|
|
811
|
+
)
|
|
812
|
+
|
|
813
|
+
//
|
|
814
|
+
// 6. ADMINISTRATIVE NAMESPACE
|
|
815
|
+
//
|
|
816
|
+
const administrative = domain.addNamespace({
|
|
817
|
+
info: {
|
|
818
|
+
name: 'Administrative',
|
|
819
|
+
displayName: 'Administrative',
|
|
820
|
+
description: 'Admissions, financial aid, and scheduling',
|
|
821
|
+
},
|
|
822
|
+
})
|
|
823
|
+
|
|
824
|
+
// Administrative Model
|
|
825
|
+
const administrativeModel = administrative.addModel({
|
|
826
|
+
info: {
|
|
827
|
+
name: 'Administrative',
|
|
828
|
+
displayName: 'Administrative Management',
|
|
829
|
+
description: 'Administrative processes and records',
|
|
830
|
+
},
|
|
831
|
+
})
|
|
832
|
+
|
|
833
|
+
// Admission Entity
|
|
834
|
+
const admissionEntity = administrativeModel.addEntity({
|
|
835
|
+
info: {
|
|
836
|
+
name: 'admission',
|
|
837
|
+
displayName: 'Admission',
|
|
838
|
+
description: 'Student admission records',
|
|
839
|
+
},
|
|
840
|
+
})
|
|
841
|
+
|
|
842
|
+
addIdField(admissionEntity, { displayName: 'Admission ID', description: 'Unique identifier for the admission' })
|
|
843
|
+
|
|
844
|
+
admissionEntity.addProperty({
|
|
845
|
+
info: {
|
|
846
|
+
name: 'application_date',
|
|
847
|
+
displayName: 'Application Date',
|
|
848
|
+
description: 'Date when application was submitted',
|
|
849
|
+
},
|
|
850
|
+
type: 'date',
|
|
851
|
+
required: true,
|
|
852
|
+
})
|
|
853
|
+
|
|
854
|
+
addCustomStatusField(admissionEntity, ['pending', 'under_review', 'accepted', 'rejected', 'waitlisted'], {
|
|
855
|
+
displayName: 'Admission Status',
|
|
856
|
+
description: 'Current status of the admission',
|
|
857
|
+
})
|
|
858
|
+
|
|
859
|
+
addDescriptionField(admissionEntity, { description: 'Admission notes and decisions' })
|
|
860
|
+
|
|
861
|
+
addCreatedAtField(admissionEntity, { description: 'When the admission was created' })
|
|
862
|
+
|
|
863
|
+
// Admission-Student Association (Many-to-One)
|
|
864
|
+
admissionEntity.addAssociation(
|
|
865
|
+
{ key: studentEntity.key },
|
|
866
|
+
{
|
|
867
|
+
info: { name: 'student', displayName: 'Student', description: 'Student for this admission' },
|
|
868
|
+
required: true,
|
|
869
|
+
multiple: false,
|
|
870
|
+
}
|
|
871
|
+
)
|
|
872
|
+
|
|
873
|
+
// Financial Aid Entity
|
|
874
|
+
const financialAidEntity = administrativeModel.addEntity({
|
|
875
|
+
info: {
|
|
876
|
+
name: 'financial_aid',
|
|
877
|
+
displayName: 'Financial Aid',
|
|
878
|
+
description: 'Student financial aid and scholarships',
|
|
879
|
+
},
|
|
880
|
+
})
|
|
881
|
+
|
|
882
|
+
addIdField(financialAidEntity, {
|
|
883
|
+
displayName: 'Financial Aid ID',
|
|
884
|
+
description: 'Unique identifier for the financial aid',
|
|
885
|
+
})
|
|
886
|
+
|
|
887
|
+
financialAidEntity.addProperty({
|
|
888
|
+
info: {
|
|
889
|
+
name: 'aid_type',
|
|
890
|
+
displayName: 'Aid Type',
|
|
891
|
+
description: 'Type of financial aid',
|
|
892
|
+
},
|
|
893
|
+
type: 'string',
|
|
894
|
+
required: true,
|
|
895
|
+
schema: {
|
|
896
|
+
enum: ['scholarship', 'grant', 'loan', 'work_study'],
|
|
897
|
+
},
|
|
898
|
+
})
|
|
899
|
+
|
|
900
|
+
addCurrencyAmountField(financialAidEntity, 'amount', 'Aid Amount', {
|
|
901
|
+
description: 'Amount of financial aid awarded',
|
|
902
|
+
})
|
|
903
|
+
|
|
904
|
+
addCustomStatusField(financialAidEntity, ['pending', 'approved', 'disbursed', 'cancelled'], {
|
|
905
|
+
displayName: 'Aid Status',
|
|
906
|
+
description: 'Current status of the financial aid',
|
|
907
|
+
})
|
|
908
|
+
|
|
909
|
+
addCreatedAtField(financialAidEntity, { description: 'When the financial aid was created' })
|
|
910
|
+
|
|
911
|
+
// FinancialAid-Student Association (Many-to-One)
|
|
912
|
+
financialAidEntity.addAssociation(
|
|
913
|
+
{ key: studentEntity.key },
|
|
914
|
+
{
|
|
915
|
+
info: { name: 'student', displayName: 'Student', description: 'Student for this financial aid' },
|
|
916
|
+
required: true,
|
|
917
|
+
multiple: false,
|
|
918
|
+
}
|
|
919
|
+
)
|
|
920
|
+
|
|
921
|
+
return domain
|
|
922
|
+
}
|