Skip to content

Commit 1d39cd8

Browse files
committed
doc schema update
1 parent 6ba4971 commit 1d39cd8

File tree

2 files changed

+95
-59
lines changed

2 files changed

+95
-59
lines changed

ModelFirst/Demo.Modeling/EntityModel.Markdown.md

Lines changed: 74 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
# Model:
2626

27+
![chart](./chart.png)
28+
2729

2830

2931
## Class
@@ -38,22 +40,25 @@
3840
| [RoomUid](#ClassRoomUid-Field) (FK) | *guid* | no | no |
3941
| OfficialName | *string* | YES | no |
4042
| EducationLevelYear | *int32* | YES | no |
41-
##### Unique Keys
43+
#### Unique Keys
4244
* Uid **(primary)**
43-
##### Class.**Uid** (Field)
45+
46+
#### Class.**Uid** (Field)
4447
* this field represents the identity (PK) of the record
45-
##### Class.**PrimaryTeacherUid** (Field)
48+
49+
#### Class.**PrimaryTeacherUid** (Field)
4650
* this field is optional, so that '*null*' values are supported
4751
* this field is used as foreign key to address the related 'PrimaryTeacher'
48-
##### Class.**RoomUid** (Field)
52+
53+
#### Class.**RoomUid** (Field)
4954
* this field is optional, so that '*null*' values are supported
5055
* this field is used as foreign key to address the related 'PrimaryRoom'
5156

5257

5358
### Relations
5459

5560
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
56-
| --------------- | ----------- | ------------------- |
61+
| --------------- | -----| ----------- | ------------------- |
5762
| [PrimaryTeacher](#PrimaryTeacher-lookup-from-this-Class) | Lookup | [Teacher](#Teacher) | 1 (required) |
5863
| [PrimaryRoom](#PrimaryRoom-lookup-from-this-Class) | Lookup | [Room](#Room) | 1 (required) |
5964
| [Students](#Students-childs-of-this-Class) | Childs | [Student](#Student) | * (multiple) |
@@ -89,24 +94,29 @@ Target: [Lesson](#Lesson)
8994
| DurationHours | *decimal* | YES | no |
9095
| [TeacherUid](#LessonTeacherUid-Field) (FK) | *guid* | YES | no |
9196
| [SubjectOfficialName](#LessonSubjectOfficialName-Field) (FK) | *string* | YES | no |
92-
##### Unique Keys
97+
#### Unique Keys
9398
* Uid **(primary)**
94-
##### Lesson.**Uid** (Field)
99+
100+
#### Lesson.**Uid** (Field)
95101
* this field represents the identity (PK) of the record
96-
##### Lesson.**EducatedClassUid** (Field)
102+
103+
#### Lesson.**EducatedClassUid** (Field)
97104
* this field is used as foreign key to address the related 'EducatedClass'
98-
##### Lesson.**RoomUid** (Field)
105+
106+
#### Lesson.**RoomUid** (Field)
99107
* this field is used as foreign key to address the related 'Room'
100-
##### Lesson.**TeacherUid** (Field)
108+
109+
#### Lesson.**TeacherUid** (Field)
101110
* this field is used as foreign key to address the related 'Teaching'
102-
##### Lesson.**SubjectOfficialName** (Field)
111+
112+
#### Lesson.**SubjectOfficialName** (Field)
103113
* this field is used as foreign key to address the related 'Teaching'
104114

105115

106116
### Relations
107117

108118
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
109-
| --------------- | ----------- | ------------------- |
119+
| --------------- | -----| ----------- | ------------------- |
110120
| [EducatedClass](#EducatedClass-parent-of-this-Lesson) | Parent | [Class](#Class) | 0/1 (optional) |
111121
| [Room](#Room-lookup-from-this-Lesson) | Lookup | [Room](#Room) | 0/1 (optional) |
112122
| [Teaching](#Teaching-lookup-from-this-Lesson) | Lookup | [SubjectTeaching](#SubjectTeaching) | 0/1 (optional) |
@@ -136,18 +146,20 @@ Addressed by: [TeacherUid](#LessonTeacherUid-Field), [SubjectOfficialName](#Less
136146
| FirstName | *string* | YES | no |
137147
| LastName | *string* | YES | no |
138148
| ScoolEntryYear | *int32* | YES | no |
139-
##### Unique Keys
149+
#### Unique Keys
140150
* Uid **(primary)**
141-
##### Student.**Uid** (Field)
151+
152+
#### Student.**Uid** (Field)
142153
* this field represents the identity (PK) of the record
143-
##### Student.**ClassUid** (Field)
154+
155+
#### Student.**ClassUid** (Field)
144156
* this field is used as foreign key to address the related 'Class'
145157

146158

147159
### Relations
148160

149161
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
150-
| --------------- | ----------- | ------------------- |
162+
| --------------- | -----| ----------- | ------------------- |
151163
| [Class](#Class-parent-of-this-Student) | Parent | [Class](#Class) | 0/1 (optional) |
152164

153165
##### **Class** (parent of this Student)
@@ -168,19 +180,21 @@ Addressed by: [ClassUid](#StudentClassUid-Field).
168180
| InventoryNumber | *int16* | YES | no |
169181
| Title | *string* | YES | no |
170182
| [DedicatedToSubjectName](#EnducationItemDedicatedToSubjectName-Field) (FK) | *string* | no | no |
171-
##### Unique Keys
183+
#### Unique Keys
172184
* Uid **(primary)**
173-
##### EnducationItem.**Uid** (Field)
185+
186+
#### EnducationItem.**Uid** (Field)
174187
* this field represents the identity (PK) of the record
175-
##### EnducationItem.**DedicatedToSubjectName** (Field)
188+
189+
#### EnducationItem.**DedicatedToSubjectName** (Field)
176190
* this field is optional, so that '*null*' values are supported
177191
* this field is used as foreign key to address the related 'DedicatedToSubject'
178192

179193

180194
### Relations
181195

182196
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
183-
| --------------- | ----------- | ------------------- |
197+
| --------------- | -----| ----------- | ------------------- |
184198
| [Picture](#Picture-child-of-this-EnducationItem) | Child | [EducationItemPicture](#EducationItemPicture) | 0/1 (single) |
185199
| [DedicatedToSubject](#DedicatedToSubject-lookup-from-this-EnducationItem) | Lookup | [Subject](#Subject) | 1 (required) |
186200

@@ -203,15 +217,16 @@ This type is a specialization of [EnducationItem](#EnducationItem)
203217
| Name | Type | Required | Fix |
204218
| ---- | ---- | -------- | --- |
205219
| [RoomUid](#RoomRelatedEducationItemRoomUid-Field) (FK) | *guid* | YES | no |
206-
##### Unique Keys
207-
##### RoomRelatedEducationItem.**RoomUid** (Field)
220+
#### Unique Keys
221+
222+
#### RoomRelatedEducationItem.**RoomUid** (Field)
208223
* this field is used as foreign key to address the related 'Location'
209224

210225

211226
### Relations
212227

213228
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
214-
| --------------- | ----------- | ------------------- |
229+
| --------------- | -----| ----------- | ------------------- |
215230
| [Location](#Location-lookup-from-this-RoomRelatedEducationItem) | Lookup | [Room](#Room) | 0/1 (optional) |
216231

217232
##### **Location** (lookup from this RoomRelatedEducationItem)
@@ -231,15 +246,16 @@ This type is a specialization of [EnducationItem](#EnducationItem)
231246
| Name | Type | Required | Fix |
232247
| ---- | ---- | -------- | --- |
233248
| [TeacherUid](#TeacherRelatedEducationItemTeacherUid-Field) (FK) | *guid* | YES | no |
234-
##### Unique Keys
235-
##### TeacherRelatedEducationItem.**TeacherUid** (Field)
249+
#### Unique Keys
250+
251+
#### TeacherRelatedEducationItem.**TeacherUid** (Field)
236252
* this field is used as foreign key to address the related 'OwningTeacher'
237253

238254

239255
### Relations
240256

241257
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
242-
| --------------- | ----------- | ------------------- |
258+
| --------------- | -----| ----------- | ------------------- |
243259
| [OwningTeacher](#OwningTeacher-lookup-from-this-TeacherRelatedEducationItem) | Lookup | [Teacher](#Teacher) | 0/1 (optional) |
244260

245261
##### **OwningTeacher** (lookup from this TeacherRelatedEducationItem)
@@ -258,17 +274,18 @@ Addressed by: [TeacherUid](#TeacherRelatedEducationItemTeacherUid-Field).
258274
| ---- | ---- | -------- | --- |
259275
| [Uid](#EducationItemPictureUid-Field) **(PK)** (FK) | *guid* | YES | no |
260276
| PictureData | *byte[]* | YES | no |
261-
##### Unique Keys
277+
#### Unique Keys
262278
* Uid **(primary)**
263-
##### EducationItemPicture.**Uid** (Field)
279+
280+
#### EducationItemPicture.**Uid** (Field)
264281
* this field represents the identity (PK) of the record
265282
* this field is used as foreign key to address the related 'EnducationItem'
266283

267284

268285
### Relations
269286

270287
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
271-
| --------------- | ----------- | ------------------- |
288+
| --------------- | -----| ----------- | ------------------- |
272289
| [EnducationItem](#EnducationItem-parent-of-this-EducationItemPicture) | Parent | [EnducationItem](#EnducationItem) | 0/1 (optional) |
273290

274291
##### **EnducationItem** (parent of this EducationItemPicture)
@@ -287,16 +304,17 @@ Addressed by: [Uid](#EducationItemPictureUid-Field).
287304
| ---- | ---- | -------- | --- |
288305
| [Uid](#RoomUid-Field) **(PK)** | *guid* | YES | no |
289306
| OfficialName | *string* | YES | no |
290-
##### Unique Keys
307+
#### Unique Keys
291308
* Uid **(primary)**
292-
##### Room.**Uid** (Field)
309+
310+
#### Room.**Uid** (Field)
293311
* this field represents the identity (PK) of the record
294312

295313

296314
### Relations
297315

298316
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
299-
| --------------- | ----------- | ------------------- |
317+
| --------------- | -----| ----------- | ------------------- |
300318
| [PrimaryClasses](#PrimaryClasses-refering-to-this-Room) | Referers | [Class](#Class) | * (multiple) |
301319
| [ScheduledLessons](#ScheduledLessons-refering-to-this-Room) | Referers | [Lesson](#Lesson) | * (multiple) |
302320
| [EducationItems](#EducationItems-refering-to-this-Room) | Referers | [RoomRelatedEducationItem](#RoomRelatedEducationItem) | * (multiple) |
@@ -319,16 +337,17 @@ Target: [RoomRelatedEducationItem](#RoomRelatedEducationItem)
319337
| Name | Type | Required | Fix |
320338
| ---- | ---- | -------- | --- |
321339
| [OfficialName](#SubjectOfficialName-Field) **(PK)** | *string* | YES | no |
322-
##### Unique Keys
340+
#### Unique Keys
323341
* OfficialName **(primary)**
324-
##### Subject.**OfficialName** (Field)
342+
343+
#### Subject.**OfficialName** (Field)
325344
* this field represents the identity (PK) of the record
326345

327346

328347
### Relations
329348

330349
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
331-
| --------------- | ----------- | ------------------- |
350+
| --------------- | -----| ----------- | ------------------- |
332351
| [EnducationItems](#EnducationItems-refering-to-this-Subject) | Referers | [EnducationItem](#EnducationItem) | * (multiple) |
333352
| [Teachings](#Teachings-refering-to-this-Subject) | Referers | [SubjectTeaching](#SubjectTeaching) | * (multiple) |
334353

@@ -350,16 +369,17 @@ Target: [SubjectTeaching](#SubjectTeaching)
350369
| [Uid](#TeacherUid-Field) **(PK)** | *guid* | YES | no |
351370
| FirstName | *string* | YES | no |
352371
| LastName | *string* | YES | no |
353-
##### Unique Keys
372+
#### Unique Keys
354373
* Uid **(primary)**
355-
##### Teacher.**Uid** (Field)
374+
375+
#### Teacher.**Uid** (Field)
356376
* this field represents the identity (PK) of the record
357377

358378

359379
### Relations
360380

361381
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
362-
| --------------- | ----------- | ------------------- |
382+
| --------------- | -----| ----------- | ------------------- |
363383
| [PrimaryClasses](#PrimaryClasses-refering-to-this-Teacher) | Referers | [Class](#Class) | * (multiple) |
364384
| [Teachings](#Teachings-childs-of-this-Teacher) | Childs | [SubjectTeaching](#SubjectTeaching) | * (multiple) |
365385
| [OwnedEducationItems](#OwnedEducationItems-refering-to-this-Teacher) | Referers | [TeacherRelatedEducationItem](#TeacherRelatedEducationItem) | * (multiple) |
@@ -383,20 +403,22 @@ Target: [TeacherRelatedEducationItem](#TeacherRelatedEducationItem)
383403
| ---- | ---- | -------- | --- |
384404
| [TeacherUid](#SubjectTeachingTeacherUid-Field) **(PK)** (FK) | *guid* | YES | no |
385405
| [SubjectOfficialName](#SubjectTeachingSubjectOfficialName-Field) **(PK)** (FK) | *string* | YES | no |
386-
##### Unique Keys
406+
#### Unique Keys
387407
* TeacherUid + SubjectOfficialName **(primary)**
388-
##### SubjectTeaching.**TeacherUid** (Field)
408+
409+
#### SubjectTeaching.**TeacherUid** (Field)
389410
* this field represents the identity (PK) of the record
390411
* this field is used as foreign key to address the related 'Teacher'
391-
##### SubjectTeaching.**SubjectOfficialName** (Field)
412+
413+
#### SubjectTeaching.**SubjectOfficialName** (Field)
392414
* this field represents the identity (PK) of the record
393415
* this field is used as foreign key to address the related 'Subject'
394416

395417

396418
### Relations
397419

398420
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
399-
| --------------- | ----------- | ------------------- |
421+
| --------------- | -----| ----------- | ------------------- |
400422
| [ScheduledLessons](#ScheduledLessons-refering-to-this-SubjectTeaching) | Referers | [Lesson](#Lesson) | * (multiple) |
401423
| [Subject](#Subject-lookup-from-this-SubjectTeaching) | Lookup | [Subject](#Subject) | 0/1 (optional) |
402424
| [Teacher](#Teacher-parent-of-this-SubjectTeaching) | Parent | [Teacher](#Teacher) | 0/1 (optional) |
@@ -427,23 +449,27 @@ Target: [TeachingRequiredItem](#TeachingRequiredItem)
427449
| [TeacherUid](#TeachingRequiredItemTeacherUid-Field) (FK) | *guid* | YES | no |
428450
| [SubjectOfficialName](#TeachingRequiredItemSubjectOfficialName-Field) (FK) | *string* | YES | no |
429451
| [RequiredEducationItemUid](#TeachingRequiredItemRequiredEducationItemUid-Field) (FK) | *guid* | YES | no |
430-
##### Unique Keys
452+
#### Unique Keys
431453
* Uid **(primary)**
432-
##### TeachingRequiredItem.**Uid** (Field)
454+
455+
#### TeachingRequiredItem.**Uid** (Field)
433456
* this field represents the identity (PK) of the record
434457
* this identity is a internal record id, so that it must not be exposed to other systems or displayed to end-users!
435-
##### TeachingRequiredItem.**TeacherUid** (Field)
458+
459+
#### TeachingRequiredItem.**TeacherUid** (Field)
436460
* this field is used as foreign key to address the related 'Teaching'
437-
##### TeachingRequiredItem.**SubjectOfficialName** (Field)
461+
462+
#### TeachingRequiredItem.**SubjectOfficialName** (Field)
438463
* this field is used as foreign key to address the related 'Teaching'
439-
##### TeachingRequiredItem.**RequiredEducationItemUid** (Field)
464+
465+
#### TeachingRequiredItem.**RequiredEducationItemUid** (Field)
440466
* this field is used as foreign key to address the related 'RequiredItem'
441467

442468

443469
### Relations
444470

445471
| Navigation-Name | Role | Target-Type | Target-Multiplicity |
446-
| --------------- | ----------- | ------------------- |
472+
| --------------- | -----| ----------- | ------------------- |
447473
| [Teaching](#Teaching-parent-of-this-TeachingRequiredItem) | Parent | [SubjectTeaching](#SubjectTeaching) | 0/1 (optional) |
448474
| [RequiredItem](#RequiredItem-lookup-from-this-TeachingRequiredItem) | Lookup | [TeacherRelatedEducationItem](#TeacherRelatedEducationItem) | 0/1 (optional) |
449475

0 commit comments

Comments
 (0)