Database — Core: Administration¶
Identity and permissions, the organisation structure, reference and lookup data, the work calendar, announcements, notifications, the document archive and the audit log.
This is the largest group — 40 entities — because it holds everything cross-cutting. The
permission model (AppUserGroup → AppUserGroupPermission → AppPermission) and the two identity
tables (ApplicationUser for login, AppUser for the employee) both live here. See
Security & Permissions and the
Administration module.
40 entities 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¶
AnnouncementRecipient¶
DbSet AnnouncementRecipients · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/AnnouncementRecipient.cs
erDiagram
AnnouncementRecipient {
int Id PK
int AnnouncementsId FK
}
Announcements {
int AnnouncementId PK
}
Announcements ||--o{ AnnouncementRecipient : "AnnouncementsId"
| Column | Type | Null | Notes |
|---|---|---|---|
Id |
int |
PK | |
Recipient |
int |
||
Type |
int |
||
Announcements |
int |
FK → Announcements |
Navigation: Announcements → Announcements
Announcements¶
inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/Announcements.cs
erDiagram
Announcements {
int AnnouncementId PK
int CreatedBy FK
}
AppUser {
int UserId PK
}
AnnouncementRecipient {
int Id PK
int AnnouncementsId FK
}
AppUser ||--o{ Announcements : "CreatedBy"
Announcements ||--o{ AnnouncementRecipient : "AnnouncementsId"
| Column | Type | Null | Notes |
|---|---|---|---|
Announcement |
int |
PK | |
Announcement |
Guid |
||
Start |
Date |
[Column(Type |
|
End |
Date |
[Column(Type |
|
Subject |
string |
[Required] · [String |
|
Foreword |
string |
[Required] · [Column(Type |
|
Converted |
string |
✓ | |
Description |
string |
✓ | [Column(Type |
For |
bool? |
✓ | |
Created |
Date |
||
Created |
int |
FK → App |
Navigation: AppUser → AppUser, AnnouncementRecipients → ICollection<AnnouncementRecipient>
AppPermission¶
[Table("AppPermission")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/AppPermission.cs
erDiagram
AppPermission {
int AppPermissionId PK
}
AppUserGroupPermission {
int AppUserGroupPermissionId PK
int AppPermissionId FK
}
AppPermission ||--o{ AppUserGroupPermission : "AppPermissionId"
| Column | Type | Null | Notes |
|---|---|---|---|
App |
int |
PK | |
Permission |
string |
[Required] |
|
Description |
string |
✓ | [Column(Type |
Navigation: AppUserGroupPermission → ICollection<AppUserGroupPermission>
AppUserGroup¶
[Table("AppUserGroup")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/AppUserGroup.cs
erDiagram
AppUserGroup {
int GroupId PK
}
AppUserGroupMember {
int GroupMemberId PK
int GroupId FK
}
AppUserGroupPermission {
int AppUserGroupPermissionId PK
int AppUserGroupId FK
}
AppUserGroup ||--o{ AppUserGroupMember : "GroupId"
AppUserGroup ||--o{ AppUserGroupPermission : "AppUserGroupId"
| Column | Type | Null | Notes |
|---|---|---|---|
Group |
int |
PK | |
Group |
string |
[Required] |
Navigation: AppUserGroupMember → ICollection<AppUserGroupMember>, AppUserGroupPermission → ICollection<AppUserGroupPermission>
AppUserGroupMember¶
[Table("AppUserGroupMember")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/AppUserGroupMember.cs
erDiagram
AppUserGroupMember {
int GroupMemberId PK
int UserId FK
int GroupId FK
}
AppUser {
int UserId PK
}
AppUserGroup {
int GroupId PK
}
AppUser ||--o{ AppUserGroupMember : "UserId"
AppUserGroup ||--o{ AppUserGroupMember : "GroupId"
| Column | Type | Null | Notes |
|---|---|---|---|
Group |
int |
PK | |
Group |
int |
FK → App |
|
User |
int |
FK → App |
|
Is |
bool |
||
Added |
Date |
Navigation: AppUser → AppUser, AppUserGroup → AppUserGroup
AppUserGroupPermission¶
[Table("AppUserGroupPermission")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/AppUserGroupPermission.cs
erDiagram
AppUserGroupPermission {
int AppUserGroupPermissionId PK
int AppPermissionId FK
int AppUserGroupId FK
}
AppPermission {
int AppPermissionId PK
}
AppUserGroup {
int GroupId PK
}
AppPermission ||--o{ AppUserGroupPermission : "AppPermissionId"
AppUserGroup ||--o{ AppUserGroupPermission : "AppUserGroupId"
| Column | Type | Null | Notes |
|---|---|---|---|
App |
int |
PK | |
App |
int |
FK → App |
|
App |
int |
FK → App |
Navigation: AppPermission → AppPermission, AppUserGroup → AppUserGroup
AppUserProjectPermission¶
[Table("AppUserProjectPermission")] · DbSet AppUserProjectPermissions · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/AppUserProjectPermission.cs
erDiagram
AppUserProjectPermission {
int ProjectPermissionId PK
int UserId FK
}
AppUser {
int UserId PK
}
AppUser ||--o{ AppUserProjectPermission : "UserId"
| Column | Type | Null | Notes |
|---|---|---|---|
Project |
int |
PK | |
Project |
int |
||
User |
int |
FK → App |
|
Area |
int |
||
Permission |
int |
||
Is |
bool |
Navigation: AppUser → AppUser
ArchiveFile¶
[Table("ArchiveFile")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/ArchiveFile.cs
erDiagram
ArchiveFile {
int FileId PK
int CreatedBy FK
int FileTypeId FK
}
AppUser {
int UserId PK
}
ArchiveFileType {
int FileTypeId PK
}
AppUser ||--o{ ArchiveFile : "CreatedBy"
ArchiveFileType |o--o{ ArchiveFile : "FileTypeId"
| Column | Type | Null | Notes |
|---|---|---|---|
File |
int |
PK | |
File |
Guid |
||
Area |
int? |
✓ | |
Reference |
int? |
✓ | |
File |
int? |
✓ | FK → Archive |
Filename |
string |
✓ | [String |
Description |
string |
✓ | [Column(Type |
File |
string |
✓ | [String |
File |
int? |
✓ | |
Is |
bool |
||
Created |
int |
FK → App |
|
Created |
Date |
Navigation: AppUser → AppUser, ArchiveFileType → ArchiveFileType
ArchiveFileType¶
[Table("ArchiveFileType")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/ArchiveFileType.cs
erDiagram
ArchiveFileType {
int FileTypeId PK
}
ArchiveFile {
int FileId PK
int FileTypeId FK
}
ArchiveFileType |o--o{ ArchiveFile : "FileTypeId"
| Column | Type | Null | Notes |
|---|---|---|---|
File |
int |
PK | |
File |
string |
✓ | [String |
Area |
int? |
✓ |
Navigation: ArchiveFile → ICollection<ArchiveFile>
CommonBranch¶
[Table("CommonBranch")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonBranch.cs
erDiagram
direction LR
CommonBranch {
int BranchId PK
int TreasureId FK
int ManagerId FK
int LogisticId FK
int FinanceId FK
int HRId FK
int AccountingId FK
int CountryId FK
}
AppUser {
int UserId PK
int BranchId FK
}
CommonCountry {
int CommonCountryId PK
}
Timesheet {
int TimesheetId PK
int BranchId FK
}
Job {
int JobId PK
int BranchId FK
}
SharedPermissionBranch {
int Id PK
int BranchId FK
}
CommonSubBranch {
int SubBranchId PK
int BranchId FK
}
CalendarProfile {
int CalendarProfileId PK
int CommonBranchId FK
}
BudgetLineBranch {
int Id PK
int CommonBranchId FK
}
MasterBudgetDetails {
int MasterBudgetDetailsId PK
int PlaceId FK
}
PayrollInfo {
int PayrollInfoId PK
int BranchId FK
}
ProjectPlace {
int ProjectPlaceId PK
int BranchId FK
}
AppUser |o--o{ CommonBranch : "TreasureId, ManagerId, LogisticId +3 more"
CommonCountry ||--o{ CommonBranch : "CountryId"
CommonBranch ||--o{ Timesheet : "BranchId"
CommonBranch ||--o{ Job : "BranchId"
CommonBranch ||--o{ AppUser : "BranchId"
CommonBranch ||--o{ SharedPermissionBranch : "BranchId"
CommonBranch ||--o{ CommonSubBranch : "BranchId"
CommonBranch |o--o{ CalendarProfile : "CommonBranchId"
CommonBranch ||--o{ BudgetLineBranch : "CommonBranchId"
CommonBranch ||--o{ MasterBudgetDetails : "PlaceId"
CommonBranch ||--o{ PayrollInfo : "BranchId"
CommonBranch ||--o{ ProjectPlace : "BranchId"
| Column | Type | Null | Notes |
|---|---|---|---|
Branch |
int |
PK | |
Branch |
string |
[Required] |
|
Name |
string |
✓ | [String |
Is |
bool |
||
Country |
int |
FK → Common |
|
Treasure |
int? |
✓ | FK → App |
Logistic |
int? |
✓ | FK → App |
Finance |
int? |
✓ | FK → App |
Manager |
int? |
✓ | FK → App |
HRId |
int? |
✓ | FK → App |
Accounting |
int? |
✓ | FK → App |
Address |
string |
✓ | |
Committee |
int? |
✓ | |
NKOProfile |
int |
||
Is |
bool |
||
Is |
bool |
Navigation: AppUserTreasure → AppUser, AppUserManager → AppUser, AppUserLogistic → AppUser, AppUserFinance → AppUser, AppUserHR → AppUser, AppUserAccounting → AppUser, CommonCountry → CommonCountry, Jobs → ICollection<Job>, AppUser → ICollection<AppUser>, CommonSubBranch → ICollection<CommonSubBranch>, PayrollInfo → ICollection<PayrollInfo>, ProjectPlace → ICollection<ProjectPlace>, CalendarProfiles → ICollection<CalendarProfile>, Timesheets → ICollection<Timesheet>, MasterBudgetDetails → ICollection<MasterBudgetDetails>
CommonCategory¶
[Table("CommonCategory")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonCategory.cs
erDiagram
CommonCategory {
int CategoryId PK
}
MasterBudgetDetails {
int MasterBudgetDetailsId PK
int CategoryId FK
}
CommonCategory ||--o{ MasterBudgetDetails : "CategoryId"
| Column | Type | Null | Notes |
|---|---|---|---|
Category |
int |
PK | |
Name |
string |
[Required] · [String |
Navigation: MasterBudgetDetails → ICollection<MasterBudgetDetails>
CommonCountry¶
[Table("CommonCountry")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonCountry.cs
erDiagram
direction LR
CommonCountry {
int CommonCountryId PK
}
Applicants {
int ApplicantId PK
int CountryId FK
}
AppUser {
int UserId PK
int CountryId FK
}
Governorate {
int GovernorateId PK
int CountryId FK
}
CommonBranch {
int BranchId PK
int CountryId FK
}
CommonCountry ||--o{ Applicants : "CountryId"
CommonCountry |o--o{ AppUser : "CountryId"
CommonCountry ||--o{ Governorate : "CountryId"
CommonCountry ||--o{ CommonBranch : "CountryId"
| Column | Type | Null | Notes |
|---|---|---|---|
Common |
int |
PK | |
Name |
string |
[Required] · [String |
|
Ar |
string |
✓ | [String |
Is |
bool |
Navigation: Applicants → ICollection<Applicants>, CommonBranches → ICollection<CommonBranch>, AppUsers → ICollection<AppUser>
CommonDegree¶
[Table("CommonDegree")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonDegree.cs
erDiagram
CommonDegree {
int DegreeId PK
}
Applicants {
int ApplicantId PK
int HighestDegreeReceived FK
}
CommonDegree ||--o{ Applicants : "HighestDegreeReceived"
| Column | Type | Null | Notes |
|---|---|---|---|
Degree |
int |
PK | |
Name |
string |
[Required] · [String |
|
Ar |
string |
✓ |
Navigation: Applicants → ICollection<Applicants>
CommonDepartment¶
[Table("CommonDepartment")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonDepartment.cs
erDiagram
direction LR
CommonDepartment {
int DepartmentId PK
int PositionId FK
int HighDeptId FK
}
AppUserPosition {
int PositionId PK
int DepartmentId FK
}
Job {
int JobId PK
int DepartmentId FK
}
AppUserContract {
int ContractId PK
int DepartmentId FK
}
RecruitmentTracker {
int RecruitmentTrackerId PK
int DepartmentId FK
}
PayrollInfo {
int PayrollInfoId PK
int DepartmentId FK
}
AppUserPosition |o--o{ CommonDepartment : "PositionId"
CommonDepartment |o--o{ CommonDepartment : "HighDeptId"
CommonDepartment ||--o{ Job : "DepartmentId"
CommonDepartment |o--o{ AppUserContract : "DepartmentId"
CommonDepartment |o--o{ RecruitmentTracker : "DepartmentId"
CommonDepartment |o--o{ AppUserPosition : "DepartmentId"
CommonDepartment |o--o{ PayrollInfo : "DepartmentId"
| Column | Type | Null | Notes |
|---|---|---|---|
Department |
int |
PK | |
Name |
string |
[Required] · [String |
|
Name |
string |
[Required] · [String |
|
Is |
bool |
||
High |
int? |
✓ | FK → Common |
Position |
int? |
✓ | FK → App · [Required] |
Is |
bool |
Navigation: Position → AppUserPosition, HighDepartment → CommonDepartment, ChildDepartments → ICollection<CommonDepartment>, AppUserContracts → ICollection<AppUserContract>, RecruitmentTracker → ICollection<RecruitmentTracker>, Job → ICollection<Job>, PayrollInfo → ICollection<PayrollInfo>, AppUserPositions → ICollection<AppUserPosition>
CommonGeneralLevel¶
[Table("CommonGeneralLevel")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonGeneralLevel.cs
erDiagram
CommonGeneralLevel {
int GeneralLevelId PK
}
Applicants {
int ApplicantId PK
int WordOffice FK
int PPTOffice FK
int ExcelOffice FK
}
CommonGeneralLevel ||--o{ Applicants : "WordOffice, PPTOffice, ExcelOffice"
| Column | Type | Null | Notes |
|---|---|---|---|
General |
int |
PK | |
Name |
string |
[Required] · [String |
|
Ar |
string |
✓ |
Navigation: Applicants → ICollection<Applicants>, Applicants1 → ICollection<Applicants>, Applicants2 → ICollection<Applicants>
CommonIncrement¶
[Table("CommonIncrement")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonIncrement.cs
erDiagram
CommonIncrement {
int CommonIncrementId PK
}
| Column | Type | Null | Notes |
|---|---|---|---|
Common |
int |
PK | |
Project |
string |
✓ | |
Location |
string |
✓ | |
Year |
int |
||
Last |
int |
||
Area |
int |
CommonLanguageLevel¶
[Table("CommonLanguageLevel")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonLanguageLevel.cs
erDiagram
CommonLanguageLevel {
int LanguageLevelId PK
}
Applicants {
int ApplicantId PK
int Arabic FK
int English FK
int Turkish FK
}
CommonLanguageLevel ||--o{ Applicants : "Arabic, English, Turkish"
| Column | Type | Null | Notes |
|---|---|---|---|
Language |
int |
PK | |
Name |
string |
[Required] · [String |
|
Ar |
string |
✓ |
Navigation: Applicants → ICollection<Applicants>, Applicants1 → ICollection<Applicants>, Applicants3 → ICollection<Applicants>
CommonMainCategory¶
[Table("CommonMainCategory")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonMainCategory.cs
erDiagram
CommonMainCategory {
int CommonMainCategoryId PK
}
PurchaseRequest {
int PrId PK
int CatId FK
}
CommonMainCategory |o--o{ PurchaseRequest : "CatId"
| Column | Type | Null | Notes |
|---|---|---|---|
Common |
int |
PK | |
Name |
string |
[Required] · [String |
Navigation: PurchaseRequest → ICollection<PurchaseRequest>
CommonMajorEducation¶
[Table("CommonMajorEducation")]
NKO.Lib/NKO.DataAccess/DbModel/CommonMajorEducation.cs
erDiagram
CommonMajorEducation {
int MajorEducationId PK
}
Applicants {
int ApplicantId PK
int CommonMajorEducationMajorEducationId FK
}
CommonMajorEducation |o--o{ Applicants : "CommonMajorEducationMajorEducationId"
| Column | Type | Null | Notes |
|---|---|---|---|
Major |
int |
PK | |
Name |
string |
[Required] · [String |
|
Ar |
string |
✓ |
Navigation: Applicants → ICollection<Applicants>
CommonManagers¶
inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonManagers.cs
erDiagram
CommonManagers {
int CommonManagersId PK
}
| Column | Type | Null | Notes |
|---|---|---|---|
Common |
int |
PK | |
User |
int |
||
Manager |
int |
||
Area |
int |
||
Stage |
int |
CommonPermission¶
[Table("CommonPermission")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonPermission.cs
erDiagram
CommonPermission {
int PermissionId PK
}
CommonSharedPermission {
int SharedPermissionId PK
int PermissionId FK
}
CommonPermission ||--o{ CommonSharedPermission : "PermissionId"
| Column | Type | Null | Notes |
|---|---|---|---|
Permission |
int |
PK | |
Permission |
string |
[Required] · [String |
Navigation: CommonSharedPermission → ICollection<CommonSharedPermission>
CommonProgram¶
[Table("CommonProgram")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonProgram.cs
erDiagram
CommonProgram {
int ProgramId PK
}
ProjectProgram {
int ProjectProgramId PK
int ProgramId FK
}
CommonProgram ||--o{ ProjectProgram : "ProgramId"
| Column | Type | Null | Notes |
|---|---|---|---|
Program |
int |
PK | |
Name |
string |
[Required] · [String |
Navigation: ProjectPrograms → ICollection<ProjectProgram>
CommonSetting¶
[Table("CommonSetting")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonSetting.cs
erDiagram
CommonSetting {
int SettingId PK
}
| Column | Type | Null | Notes |
|---|---|---|---|
Setting |
int |
PK | |
Setting |
string |
[Required] · [String |
|
Setting |
string |
[Required] · [String |
|
Setting |
string |
✓ | [String |
CommonSharedPermission¶
[Table("CommonSharedPermission")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonSharedPermission.cs
erDiagram
CommonSharedPermission {
int SharedPermissionId PK
int UserId FK
int PermissionId FK
}
AppUser {
int UserId PK
}
CommonPermission {
int PermissionId PK
}
SharedPermissionBranch {
int Id PK
int SharedPermissionId FK
}
AppUser ||--o{ CommonSharedPermission : "UserId"
CommonPermission ||--o{ CommonSharedPermission : "PermissionId"
CommonSharedPermission ||--o{ SharedPermissionBranch : "SharedPermissionId"
| Column | Type | Null | Notes |
|---|---|---|---|
Shared |
int |
PK | |
Permission |
int |
FK → Common |
|
User |
int |
FK → App |
|
Type |
int |
Navigation: AppUser → AppUser, CommonPermission → CommonPermission, PermissionBranches → ICollection<SharedPermissionBranch>
CommonSubBranch¶
[Table("CommonSubBranch")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonSubBranch.cs
erDiagram
CommonSubBranch {
int SubBranchId PK
int BranchId FK
}
CommonBranch {
int BranchId PK
}
AppUser {
int UserId PK
int SubBranchId FK
}
PayrollInfo {
int PayrollInfoId PK
int SubBranchId FK
}
CommonBranch ||--o{ CommonSubBranch : "BranchId"
CommonSubBranch ||--o{ AppUser : "SubBranchId"
CommonSubBranch |o--o{ PayrollInfo : "SubBranchId"
| Column | Type | Null | Notes |
|---|---|---|---|
Sub |
int |
PK | |
Name |
string |
[Required] |
|
Branch |
int |
FK → Common |
|
Is |
bool |
||
Is |
bool |
Navigation: CommonBranch → CommonBranch, AppUsers → ICollection<AppUser>, PayrollInfos → ICollection<PayrollInfo>
CommonSubCategory¶
[Table("CommonSubCategory")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/CommonSubCategory.cs
erDiagram
CommonSubCategory {
int SubCategoryId PK
}
| Column | Type | Null | Notes |
|---|---|---|---|
Sub |
int |
PK | |
Name |
string |
[Required] · [String |
CommonUnit¶
[Table("CommonUnit")]
NKO.Lib/NKO.DataAccess/DbModel/CommonUnit.cs
erDiagram
CommonUnit {
int CommonUnitId PK
}
Materials {
int MaterialId PK
int UnitId FK
}
BudgetLine {
int Id PK
int UnitId FK
}
CommonUnit ||--o{ Materials : "UnitId"
CommonUnit |o--o{ BudgetLine : "UnitId"
| Column | Type | Null | Notes |
|---|---|---|---|
Common |
int |
PK | |
Unit |
string |
[Required] · [String |
|
Name |
string |
✓ | [String |
Is |
bool |
Navigation: Materials → ICollection<Materials>, BudgetLines → ICollection<BudgetLine>
District¶
DbSet Districts · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/District.cs
erDiagram
District {
int DistrictId PK
int GovernorateId FK
}
Governorate {
int GovernorateId PK
}
AppUser {
int UserId PK
int DistrictId FK
}
Governorate ||--o{ District : "GovernorateId"
District |o--o{ AppUser : "DistrictId"
| Column | Type | Null | Notes |
|---|---|---|---|
District |
int |
PK | |
District |
string |
[Required] · [String |
|
District |
string |
✓ | |
Governorate |
int |
FK → Governorate |
Navigation: Governorate → Governorate
Governorate¶
DbSet Governorates · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/Governorate.cs
erDiagram
Governorate {
int GovernorateId PK
int CountryId FK
}
CommonCountry {
int CommonCountryId PK
}
District {
int DistrictId PK
int GovernorateId FK
}
CommonCountry ||--o{ Governorate : "CountryId"
Governorate ||--o{ District : "GovernorateId"
| Column | Type | Null | Notes |
|---|---|---|---|
Governorate |
int |
PK | |
Governorate |
string |
[Required] · [String |
|
Governorate |
string |
✓ | |
Country |
int |
FK → Common |
Navigation: CommonCountry → CommonCountry
Nationality¶
[Table("Nationality")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/Nationality.cs
erDiagram
direction LR
Nationality {
int NationalityId PK
}
Applicants {
int ApplicantId PK
int NationalityId FK
}
AppUser {
int UserId PK
int NatId FK
int SndNatId FK
}
AppUserFamily {
int AppUserFamilyId PK
int NationalityId FK
}
AppUserContract {
int ContractId PK
int DefaultNatId FK
}
Nationality ||--o{ Applicants : "NationalityId"
Nationality |o--o{ AppUser : "NatId, SndNatId"
Nationality ||--o{ AppUserFamily : "NationalityId"
Nationality |o--o{ AppUserContract : "DefaultNatId"
| Column | Type | Null | Notes |
|---|---|---|---|
Nationality |
int |
PK | |
Name |
string |
[Required] · [String |
|
Ar |
string |
✓ | [String |
Is |
bool |
Navigation: Applicants → ICollection<Applicants>, AppUser → ICollection<AppUser>, AppUserSnd → ICollection<AppUser>, AppUserFamilies → ICollection<AppUserFamily>
Notification¶
[Table("Notification")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/Notification.cs
erDiagram
direction LR
Notification {
int NotificationId PK
int ReqUserId FK
int CreatedBy FK
int NotificationActionTypeId FK
int NotificationTypeId FK
}
AppUser {
int UserId PK
}
NotificationActionType {
int NotificationActionTypeId PK
}
NotificationType {
int NotificationTypeId PK
}
NotificationUser {
int NotificationUserId PK
int NotificationId FK
}
AppUser ||--o{ Notification : "ReqUserId, CreatedBy"
NotificationActionType ||--o{ Notification : "NotificationActionTypeId"
NotificationType ||--o{ Notification : "NotificationTypeId"
Notification ||--o{ NotificationUser : "NotificationId"
| Column | Type | Null | Notes |
|---|---|---|---|
Notification |
int |
PK | |
Notification |
Guid |
||
Req |
int |
FK → App |
|
Notification |
int |
FK → Notification |
|
Notification |
int |
FK → Notification |
|
Content |
string |
✓ | [String |
Created |
Date |
||
Is |
bool |
||
Created |
int |
FK → App |
Navigation: ReqUser → AppUser, AppUser → AppUser, NotificationActionType → NotificationActionType, NotificationType → NotificationType, NotificationUser → ICollection<NotificationUser>
NotificationActionType¶
[Table("NotificationActionType")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/NotificationActionType.cs
erDiagram
NotificationActionType {
int NotificationActionTypeId PK
}
Notification {
int NotificationId PK
int NotificationActionTypeId FK
}
NotificationActionType ||--o{ Notification : "NotificationActionTypeId"
| Column | Type | Null | Notes |
|---|---|---|---|
Notification |
int |
PK | |
Notification |
string |
[Required] · [String |
Navigation: Notification → ICollection<Notification>
NotificationType¶
[Table("NotificationType")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/NotificationType.cs
erDiagram
NotificationType {
int NotificationTypeId PK
}
Notification {
int NotificationId PK
int NotificationTypeId FK
}
NotificationType ||--o{ Notification : "NotificationTypeId"
| Column | Type | Null | Notes |
|---|---|---|---|
Notification |
int |
PK | |
Notification |
string |
[Required] · [String |
|
Description |
string |
✓ | [Column(Type |
Description |
string |
✓ | [Column(Type |
Navigation: Notification → ICollection<Notification>
NotificationUser¶
[Table("NotificationUser")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/NotificationUser.cs
erDiagram
NotificationUser {
int NotificationUserId PK
int NotificationId FK
}
Notification {
int NotificationId PK
}
Notification ||--o{ NotificationUser : "NotificationId"
| Column | Type | Null | Notes |
|---|---|---|---|
Notification |
int |
PK | |
Notification |
Guid |
||
Notification |
int |
FK → Notification |
|
Recipient |
int |
||
Is |
bool |
||
Read |
Date |
✓ |
Navigation: Notification → Notification
PositionLevel¶
[Table("PositionLevel")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/PositionLevel.cs
erDiagram
PositionLevel {
int LevelId PK
}
PositionLevelMatrix {
int LevelMatrixId PK
int LevelId FK
}
EvaluationElement {
int EvaluationEIementId PK
int LevelId FK
}
PositionLevel ||--o{ PositionLevelMatrix : "LevelId"
PositionLevel |o--o{ EvaluationElement : "LevelId"
| Column | Type | Null | Notes |
|---|---|---|---|
Level |
int |
PK | |
Name |
string |
[Required] · [String |
|
Attendance |
int? |
✓ |
Navigation: EvaluationElement → ICollection<EvaluationElement>, PositionLevelMatrix → ICollection<PositionLevelMatrix>
PositionLevelMatrix¶
[Table("PositionLevelMatrix")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/PositionLevelMatrix.cs
erDiagram
PositionLevelMatrix {
int LevelMatrixId PK
int CalProfileId FK
int LevelId FK
}
CalendarProfile {
int CalendarProfileId PK
}
PositionLevel {
int LevelId PK
}
PositionLevelStep {
int StepId PK
int PositionLevelMatrixId FK
}
CalendarProfile ||--o{ PositionLevelMatrix : "CalProfileId"
PositionLevel ||--o{ PositionLevelMatrix : "LevelId"
PositionLevelMatrix ||--o{ PositionLevelStep : "PositionLevelMatrixId"
| Column | Type | Null | Notes |
|---|---|---|---|
Level |
int |
PK | |
Level |
int |
FK → Position |
|
Cal |
int |
FK → Calendar |
Navigation: CalendarProfile → CalendarProfile, PositionLevel → PositionLevel, PositionLevelSteps → ICollection<PositionLevelStep>
PositionLevelStep¶
DbSet PositionLevelSteps · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/PositionLevelStep.cs
erDiagram
PositionLevelStep {
int StepId PK
int PositionLevelMatrixId FK
int PositionStepId FK
}
PositionLevelMatrix {
int LevelMatrixId PK
}
PositionStep {
int PositionStepId PK
}
PositionLevelMatrix ||--o{ PositionLevelStep : "PositionLevelMatrixId"
PositionStep ||--o{ PositionLevelStep : "PositionStepId"
| Column | Type | Null | Notes |
|---|---|---|---|
Step |
int |
PK | |
Amount |
decimal |
||
Position |
int |
FK → Position |
|
Position |
int |
FK → Position |
Navigation: PositionLevelMatrix → PositionLevelMatrix, PositionStep → PositionStep
PositionStep¶
DbSet PositionSteps · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/PositionStep.cs
erDiagram
PositionStep {
int PositionStepId PK
}
PositionLevelStep {
int StepId PK
int PositionStepId FK
}
PositionStep ||--o{ PositionLevelStep : "PositionStepId"
| Column | Type | Null | Notes |
|---|---|---|---|
Position |
int |
PK | |
Name |
string |
✓ |
Navigation: PositionLevelSteps → ICollection<PositionLevelStep>
SharedPermissionBranch¶
[Table("SharedPermissionBranch")]
NKO.Lib/NKO.DataAccess/DbModel/SharedPermissionBranch.cs
erDiagram
SharedPermissionBranch {
int Id PK
int BranchId FK
int SharedPermissionId FK
}
CommonBranch {
int BranchId PK
}
CommonSharedPermission {
int SharedPermissionId PK
}
CommonBranch ||--o{ SharedPermissionBranch : "BranchId"
CommonSharedPermission ||--o{ SharedPermissionBranch : "SharedPermissionId"
| Column | Type | Null | Notes |
|---|---|---|---|
Id |
int |
PK | |
Branch |
int |
FK → Common |
|
Shared |
int |
FK → Common |
Navigation: Branch → CommonBranch, SharedPermission → CommonSharedPermission
UpdatedUser¶
[Table("UpdatedUser")] · inherits BaseEntity
NKO.Lib/NKO.DataAccess/DbModel/UpdatedUser.cs
erDiagram
UpdatedUser {
int OnlineId PK
int UserId FK
}
AppUser {
int UserId PK
}
AppUser ||--o{ UpdatedUser : "UserId"
| Column | Type | Null | Notes |
|---|---|---|---|
Online |
int |
PK | |
User |
int |
FK → App |
|
Date |
Date |
||
Content |
string |
✓ | |
System |
string |
✓ | |
IP |
string |
✓ | |
Method |
string |
✓ | |
Is |
bool |
||
Area |
string |
✓ | |
Action |
string |
✓ | |
Refrence |
string |
✓ |
Navigation: AppUser → AppUser