Database — Core: Training¶
The smallest module in the system: one entity. A TrainingRequest carries its own five-step
approval inline — a <Role>Id / <Role>Sign / <Role>SignDate / <Role>Note block for the
requester, manager, HR, finance and country director — rather than in a separate workflow table.
This is the clearest example of the workflow-column pattern used across every other document type. See the Training module.
1 entity in NKO_DB, context NKO_DBEntities1.
How to read this page
Generated from the EF Core model in NKO.Lib/NKO.DataAccess/DbModel/ — class names,
property types, nullability, data annotations and the relationships configured in
NKO_DBEntities1.OnModelCreating.
Each heading is the table name. Where the C# class is named differently — it is often
singular where the table is plural (StockDetail the class, StockDetails the table) — the
class name is stated under the heading. The file name is not authoritative:
StockDetails.cs declares public class StockDetail.
A ✓ in Null means the column is nullable: a nullable value type, or a reference type
with no [Required] — so a [Required] string is shown as not-null. Foreign keys are shown
where the fluent configuration or the <Entity>Id naming convention identifies a target.
Entities¶
TrainingRequest¶
DbSet TrainingRequests · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/TrainingRequest.cs
erDiagram
TrainingRequest {
int TrainingRequestId PK
int ProjectId FK
int CreatedBy FK
int ManagerId FK
int HRId FK
int FinanceId FK
int CountryId FK
int NextUserId FK
int RefuseId FK
}
Project {
int ProjectId PK
}
AppUser {
int UserId PK
}
Project ||--o{ TrainingRequest : "ProjectId"
AppUser ||--o{ TrainingRequest : "CreatedBy"
AppUser |o--o{ TrainingRequest : "ManagerId, HRId, FinanceId +3 more"
| Column | Type | Null | Notes |
|---|---|---|---|
Training |
int |
PK | |
Training |
Guid |
||
Name |
string |
[Required] |
|
Training |
Date |
[Required] |
|
Trainer |
string |
[Required] |
|
Description |
string |
[Required] |
|
Trans |
decimal |
[Required] |
|
Training |
decimal |
[Required] |
|
Project |
int |
FK → Project · [Required] |
|
Location |
string |
✓ | |
Planned |
int? |
✓ | |
Training |
int? |
✓ | |
Is |
bool |
||
Details |
string |
✓ | |
Currency |
int? |
✓ | |
Req |
bool |
||
Req |
string |
✓ | [String |
Req |
Date |
✓ | |
Manager |
int? |
✓ | FK → App |
Manager |
bool |
||
Manager |
Date |
✓ | |
Manager |
string |
✓ | [String |
HRId |
int? |
✓ | FK → App |
HRSign |
bool |
||
HRNote |
string |
✓ | [String |
HRSign |
Date |
✓ | |
Finance |
int? |
✓ | FK → App |
Finance |
bool |
||
Finance |
Date |
✓ | |
Finance |
string |
✓ | [String |
Country |
int? |
✓ | FK → App |
Country |
bool |
||
Country |
string |
✓ | [String |
Country |
Date |
✓ | |
Refuse |
int? |
✓ | FK → App |
Is |
bool |
||
Refuse |
Date |
✓ | |
Refuse |
string |
✓ | [String |
Next |
int? |
✓ | FK → App |
Status |
int |
||
Created |
Date |
||
Created |
int |
FK → App |
Navigation: Project → Project, AppUserCreatedBy → AppUser, AppUserManager → AppUser, AppUserHR → AppUser, AppUserFinance → AppUser, AppUserCountry → AppUser, AppUserNext → AppUser, AppUserRefuse → AppUser