Database — Core: Procurement¶
The purchasing chain: Purchase Request → RFQ (with CBA supplier analysis) → Purchase Order → Goods Received Note → Payment Order, plus the provider registry and material catalogue.
Every document in the chain carries the same workflow columns — StatusId, NextUserId, a
<Role>Id / <Role>Sign / <Role>SignDate / <Role>Note block per approver, and
RefuseId / IsRefused / RefuseDate / RefuseNote. See the
Procurement module and the
Procurement cycle.
17 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¶
GoodReceivedNote¶
DbSet GoodReceivedNotes
NKO.Lib/NKO.DataAccess/DbModel/GoodReceivedNote.cs
erDiagram
direction LR
GoodReceivedNote {
int GoodReceivedNoteId PK
int CreatedBy FK
int RecipientId FK
int RefusedBy FK
int CancelId FK
int NextUserId FK
int PurchaseOrderId FK
}
AppUser {
int UserId PK
}
PurchaseOrder {
int POId PK
}
PaymentOrder {
int PtoId PK
int GoodReceivedNoteId FK
}
GoodReceivedNoteMat {
int GoodReceivedNoteMatId PK
int GoodReceivedNoteId FK
}
AppUser ||--o{ GoodReceivedNote : "CreatedBy"
AppUser |o--o{ GoodReceivedNote : "RecipientId, RefusedBy, CancelId +1 more"
PurchaseOrder ||--o{ GoodReceivedNote : "PurchaseOrderId"
GoodReceivedNote |o--o{ PaymentOrder : "GoodReceivedNoteId"
GoodReceivedNote ||--o{ GoodReceivedNoteMat : "GoodReceivedNoteId"
| Column | Type | Null | Notes |
|---|---|---|---|
Good |
int |
PK | |
Good |
Guid |
||
Full |
string |
✓ | |
Invoice |
string |
✓ | |
GRNDelivery |
Date |
||
Is |
bool |
||
Type |
int |
||
Is |
bool |
||
Purchase |
int |
FK → Purchase |
|
Req |
bool |
||
Req |
Date |
✓ | |
Recipient |
int? |
✓ | FK → App |
Recipient |
bool |
||
Recipient |
Date |
✓ | |
Recipient |
string |
✓ | [Column(Type |
Next |
int? |
✓ | FK → App |
Status |
int |
||
Refused |
int? |
✓ | FK → App |
Refuse |
bool |
||
Refuse |
string |
✓ | [Column(Type |
Refuse |
Date |
✓ | |
Cancel |
bool |
||
Cancel |
string |
✓ | [Column(Type |
Cancel |
Date |
✓ | |
Cancel |
int? |
✓ | FK → App |
Notes |
string |
✓ | |
Created |
int |
FK → App |
|
Created |
Date |
Navigation: AppUserCreatedBy → AppUser, AppUserRecipient → AppUser, AppUserRefuse → AppUser, AppUserCancel → AppUser, AppUserNext → AppUser, PurchaseOrder → PurchaseOrder, PaymentOrders → ICollection<PaymentOrder>, GoodReceivedNoteMats → ICollection<GoodReceivedNoteMat>
GoodReceivedNoteMat¶
DbSet GoodReceivedNoteMats
NKO.Lib/NKO.DataAccess/DbModel/GoodReceivedNoteMat.cs
erDiagram
GoodReceivedNoteMat {
int GoodReceivedNoteMatId PK
int GoodReceivedNoteId FK
int PurchaseOrderMatId FK
}
GoodReceivedNote {
int GoodReceivedNoteId PK
}
PurchaseOrderMat {
int PurchaseOrderMatId PK
}
PaymentOrderMat {
int PaymentOrderMatId PK
int GoodReceivedNoteMatId FK
}
GoodReceivedNote ||--o{ GoodReceivedNoteMat : "GoodReceivedNoteId"
PurchaseOrderMat ||--o{ GoodReceivedNoteMat : "PurchaseOrderMatId"
GoodReceivedNoteMat |o--o{ PaymentOrderMat : "GoodReceivedNoteMatId"
| Column | Type | Null | Notes |
|---|---|---|---|
Good |
int |
PK | |
Good |
int |
FK → Good |
|
Purchase |
int |
FK → Purchase |
|
Qty |
decimal |
||
Quality |
int |
||
Description |
string |
✓ | |
Notes |
string |
✓ |
Navigation: GoodReceivedNote → GoodReceivedNote, PurchaseOrderMat → PurchaseOrderMat, PaymentOrderMats → ICollection<PaymentOrderMat>
Materials¶
NKO.Lib/NKO.DataAccess/DbModel/Materials.cs
erDiagram
Materials {
int MaterialId PK
int UnitId FK
int ProcBudgetLineId FK
}
CommonUnit {
int CommonUnitId PK
}
BudgetLine {
int Id PK
}
RFQMat {
int RFQMatId PK
int MatId FK
}
CommonUnit ||--o{ Materials : "UnitId"
BudgetLine ||--o{ Materials : "ProcBudgetLineId"
Materials ||--o{ RFQMat : "MatId"
| Column | Type | Null | Notes |
|---|---|---|---|
Material |
int |
PK | |
Seq |
int? |
✓ | |
Description |
string |
✓ | |
Stock |
int |
[Required] |
|
Unit |
int |
FK → Common · [Required] |
|
Quantity |
decimal |
[Required] |
|
Duration |
double |
[Required] |
|
Est |
decimal |
[Required] |
|
Est |
decimal |
||
Place |
string |
✓ | |
Area |
int? |
✓ | |
Reference |
int? |
✓ | |
Is |
bool |
[Required] |
|
Proc |
int |
FK → Budget |
|
Created |
int |
||
Created |
Date |
Navigation: CommonUnit → CommonUnit, BudgetLine → BudgetLine, RFQMat → ICollection<RFQMat>
PaymentOrder¶
DbSet PaymentOrders
NKO.Lib/NKO.DataAccess/DbModel/PaymentOrder.cs
erDiagram
PaymentOrder {
int PtoId PK
int GoodReceivedNoteId FK
int CreatedBy FK
int BudgetHolderId FK
int FinId FK
int SODId FK
int PayerId FK
int RefuseId FK
int CancelledId FK
int NextUserId FK
}
GoodReceivedNote {
int GoodReceivedNoteId PK
}
AppUser {
int UserId PK
}
PaymentOrderMat {
int PaymentOrderMatId PK
int PaymentOrderId FK
}
GoodReceivedNote |o--o{ PaymentOrder : "GoodReceivedNoteId"
AppUser ||--o{ PaymentOrder : "CreatedBy"
AppUser |o--o{ PaymentOrder : "BudgetHolderId, FinId, SODId +4 more"
PaymentOrder ||--o{ PaymentOrderMat : "PaymentOrderId"
| Column | Type | Null | Notes |
|---|---|---|---|
Pto |
int |
PK | |
Pto |
Guid |
||
Full |
string |
✓ | |
Reference |
string |
[Required] |
|
Good |
int? |
✓ | FK → Good |
Invoice |
int |
||
Type |
string |
✓ | |
Payment |
int |
||
Cash |
string |
✓ | |
Cash |
string |
✓ | |
Transfer |
string |
✓ | |
Transfer |
string |
✓ | |
Transfer |
string |
✓ | |
Transfer |
string |
✓ | |
Transfer |
string |
✓ | |
Transfer |
string |
✓ | |
Transfer |
double? |
✓ | |
Transfer |
string |
✓ | |
Transfer |
int? |
✓ | |
EPayment |
string |
✓ | |
EPayment |
string |
✓ | |
Sale |
decimal? |
✓ | |
Delivery |
decimal? |
✓ | |
Other |
decimal? |
✓ | |
Notes |
string |
✓ | |
Is |
bool |
||
Provider |
string |
✓ | |
Provider |
string |
✓ | |
Provider |
string |
✓ | |
Provider |
string |
✓ | |
Provider |
string |
✓ | |
Req |
Date |
✓ | |
Req |
bool |
||
Budget |
int? |
✓ | FK → App |
Budget |
string |
✓ | |
Budget |
Date |
✓ | |
Budget |
bool |
||
Fin |
int? |
✓ | FK → App |
Fin |
string |
✓ | |
Fin |
Date |
✓ | |
Fin |
bool |
||
SODId |
int? |
✓ | FK → App |
SODNotes |
string |
✓ | |
SODDate |
Date |
✓ | |
SODSign |
bool |
||
Payer |
int? |
✓ | FK → App |
Payer |
string |
✓ | |
Payer |
Date |
✓ | |
Payer |
bool |
||
Refuse |
int? |
✓ | FK → App |
Is |
bool |
||
Refuse |
Date |
✓ | |
Refuse |
string |
✓ | |
Cancelled |
int? |
✓ | FK → App |
Is |
bool |
||
Cancelled |
Date |
✓ | |
Cancelled |
string |
✓ | |
Status |
int |
||
Deleted |
bool |
||
Next |
int? |
✓ | FK → App |
Currency |
int? |
✓ | |
Created |
int |
FK → App |
|
Created |
Date |
Navigation: GoodReceivedNote → GoodReceivedNote, AppUserCreatedBy → AppUser, AppUserBudgetHolder → AppUser, AppUserFinance → AppUser, AppUserSOD → AppUser, AppUserPayer → AppUser, AppUserRefuse → AppUser, AppUserCancel → AppUser, AppUserNext → AppUser, PaymentOrderMats → ICollection<PaymentOrderMat>
PaymentOrderMat¶
DbSet PaymentOrderMats
NKO.Lib/NKO.DataAccess/DbModel/PaymentOrderMat.cs
erDiagram
PaymentOrderMat {
int PaymentOrderMatId PK
int GoodReceivedNoteMatId FK
int PaymentOrderId FK
}
GoodReceivedNoteMat {
int GoodReceivedNoteMatId PK
}
PaymentOrder {
int PtoId PK
}
GoodReceivedNoteMat |o--o{ PaymentOrderMat : "GoodReceivedNoteMatId"
PaymentOrder ||--o{ PaymentOrderMat : "PaymentOrderId"
| Column | Type | Null | Notes |
|---|---|---|---|
Payment |
int |
PK | |
Payment |
int |
FK → Payment |
|
Good |
int? |
✓ | FK → Good |
Description |
string |
✓ | |
Qty |
decimal |
||
Unit |
decimal |
||
Total |
decimal |
Navigation: GoodReceivedNoteMat → GoodReceivedNoteMat, PaymentOrder → PaymentOrder
Provider¶
DbSet Providers
NKO.Lib/NKO.DataAccess/DbModel/Provider.cs
erDiagram
Provider {
int ProviderId PK
}
RFQProvider {
int RFQProviderId PK
int ProviderId FK
}
Provider |o--o{ RFQProvider : "ProviderId"
| Column | Type | Null | Notes |
|---|---|---|---|
Provider |
int |
PK | |
Provider |
Guid |
||
Company |
string |
✓ | |
Contact |
string |
✓ | |
Position |
string |
✓ | |
Email |
string |
✓ | |
Phone |
string |
✓ | |
Fax |
string |
✓ | |
Mobile |
int? |
✓ | |
Main |
string |
✓ | |
Address |
string |
✓ | |
Account |
string |
✓ | |
Account |
string |
✓ | |
Account |
string |
✓ | |
Created |
Date |
Navigation: RFQProviders → ICollection<RFQProvider>
PurchaseOrder¶
[Table("PurchaseOrder")]
NKO.Lib/NKO.DataAccess/DbModel/PurchaseOrder.cs
erDiagram
direction LR
PurchaseOrder {
int POId PK
int CreatedBy FK
int PMId FK
int ExceptionalId FK
int FOId FK
int NextUserId FK
int RefusedBy FK
int CancelId FK
int PrId FK
int ProviderId FK
}
AppUser {
int UserId PK
}
PurchaseRequest {
int PrId PK
}
RFQProvider {
int RFQProviderId PK
}
PurchaseOrderMat {
int PurchaseOrderMatId PK
int POId FK
}
GoodReceivedNote {
int GoodReceivedNoteId PK
int PurchaseOrderId FK
}
AppUser ||--o{ PurchaseOrder : "CreatedBy"
AppUser |o--o{ PurchaseOrder : "PMId, ExceptionalId, FOId +3 more"
PurchaseRequest ||--o{ PurchaseOrder : "PrId"
RFQProvider ||--o{ PurchaseOrder : "ProviderId"
PurchaseOrder ||--o{ PurchaseOrderMat : "POId"
PurchaseOrder ||--o{ GoodReceivedNote : "PurchaseOrderId"
| Column | Type | Null | Notes |
|---|---|---|---|
POId |
int |
PK | |
Provider |
int |
FK → RFQProvider |
|
POGuid |
Guid |
||
Po |
Date |
||
Pr |
int |
FK → Purchase |
|
Po |
string |
✓ | [Column(Type |
Delivery |
string |
✓ | [Required] |
Framework |
bool |
||
Payment |
string |
✓ | |
Is |
bool |
||
Sale |
decimal? |
✓ | |
Delivery |
decimal? |
✓ | |
Other |
decimal? |
✓ | |
Score |
decimal? |
✓ | |
Po |
int? |
✓ | |
Po |
int |
||
Full |
string |
[Required] · [String |
|
Req |
bool |
||
Req |
Date |
✓ | |
PMId |
int? |
✓ | FK → App |
PMSign |
bool |
||
PMDate |
Date |
✓ | |
PMNote |
string |
✓ | [Column(Type |
Exceptional |
bool |
||
Exceptional |
Date |
✓ | |
Exceptional |
string |
✓ | [Column(Type |
Exceptional |
int? |
✓ | FK → App |
FOId |
int? |
✓ | FK → App |
FOSign |
bool |
||
FODate |
Date |
✓ | |
FONote |
string |
✓ | [Column(Type |
Next |
int? |
✓ | FK → App |
Status |
int |
||
Refused |
int? |
✓ | FK → App |
Refuse |
bool |
||
Refuse |
string |
✓ | [Column(Type |
Refuse |
Date |
✓ | |
Cancel |
bool |
||
Cancel |
string |
✓ | [Column(Type |
Cancel |
Date |
✓ | |
Cancel |
int? |
✓ | FK → App |
Deleted |
bool |
||
Created |
int |
FK → App |
|
Created |
Date |
Navigation: AppUserCreatedBy → AppUser, AppUserPM → AppUser, AppUserExceptional → AppUser, AppUserFO → AppUser, AppUserNext → AppUser, AppUserRefuse → AppUser, AppUserCancel → AppUser, PurchaseRequest → PurchaseRequest, RFQProvider → RFQProvider, PurchaseOrderMats → ICollection<PurchaseOrderMat>, GoodReceivedNotes → ICollection<GoodReceivedNote>
PurchaseOrderMat¶
DbSet PurchaseOrderMats
NKO.Lib/NKO.DataAccess/DbModel/PurchaseOrderMat.cs
erDiagram
direction LR
PurchaseOrderMat {
int PurchaseOrderMatId PK
int RFQMatId FK
int POId FK
int BudgetLine FK
}
RFQMat {
int RFQMatId PK
}
PurchaseOrder {
int POId PK
}
BudgetLine {
int Id PK
}
GoodReceivedNoteMat {
int GoodReceivedNoteMatId PK
int PurchaseOrderMatId FK
}
RFQMat ||--o{ PurchaseOrderMat : "RFQMatId"
PurchaseOrder ||--o{ PurchaseOrderMat : "POId"
BudgetLine ||--o{ PurchaseOrderMat : "BudgetLine"
PurchaseOrderMat ||--o{ GoodReceivedNoteMat : "PurchaseOrderMatId"
| Column | Type | Null | Notes |
|---|---|---|---|
Purchase |
int |
PK | |
POId |
int |
FK → Purchase |
|
RFQMat |
int |
FK → RFQMat |
|
Description |
string |
✓ | |
Budget |
int |
FK → Budget |
|
Unit |
int? |
✓ | |
Qty |
decimal |
||
Unit |
decimal |
||
Total |
decimal |
||
Country |
string |
✓ | |
Warranty |
string |
✓ | |
Valid |
Date |
✓ | |
Manufacturer |
string |
✓ | |
Model |
string |
✓ | |
Brand |
string |
✓ |
Navigation: RFQMat → RFQMat, PurchaseOrder → PurchaseOrder, ProcBudgetLine → BudgetLine, GoodReceivedNoteMats → ICollection<GoodReceivedNoteMat>
PurchaseRequest¶
[Table("PurchaseRequest")]
NKO.Lib/NKO.DataAccess/DbModel/PurchaseRequest.cs
erDiagram
direction LR
PurchaseRequest {
int PrId PK
int CreatedBy FK
int PMId FK
int FOId FK
int ProcMId FK
int SOD1Id FK
int SOD2Id FK
int SOD3Id FK
int SOD4Id FK
int NextUserId FK
int RefuseId FK
int CancelId FK
int AssignedId FK
int ProjectId FK
int CatId FK
}
AppUser {
int UserId PK
}
Project {
int ProjectId PK
}
CommonMainCategory {
int CommonMainCategoryId PK
}
RFQs {
int RFQId PK
int PrId FK
}
PurchaseOrder {
int POId PK
int PrId FK
}
AppUser ||--o{ PurchaseRequest : "CreatedBy"
AppUser |o--o{ PurchaseRequest : "PMId, FOId, ProcMId +8 more"
Project ||--o{ PurchaseRequest : "ProjectId"
CommonMainCategory |o--o{ PurchaseRequest : "CatId"
PurchaseRequest ||--o{ RFQs : "PrId"
PurchaseRequest ||--o{ PurchaseOrder : "PrId"
| Column | Type | Null | Notes |
|---|---|---|---|
Pr |
int |
PK | |
Pr |
Guid |
||
Pr |
Date |
||
Pr |
int |
||
Full |
string |
[Required] · [String |
|
Pr |
string |
✓ | [Column(Type |
Req |
bool |
||
Req |
Date |
✓ | |
PMId |
int? |
✓ | FK → App |
PMSign |
bool |
||
PMDate |
Date |
✓ | |
PMNote |
string |
✓ | [Column(Type |
FOId |
int? |
✓ | FK → App |
FOSign |
bool |
||
FODate |
Date |
✓ | |
FONote |
string |
✓ | [Column(Type |
Proc |
int? |
✓ | FK → App |
Proc |
bool |
||
Proc |
Date |
✓ | |
Proc |
string |
✓ | [Column(Type |
SOD1 |
int? |
✓ | FK → App |
SOD1 |
bool |
||
SOD1 |
Date |
✓ | |
SOD1 |
string |
✓ | [Column(Type |
SOD2 |
int? |
✓ | FK → App |
SOD2 |
bool |
||
SOD2 |
Date |
✓ | |
SOD2 |
string |
✓ | [Column(Type |
SOD3 |
int? |
✓ | FK → App |
SOD3 |
bool |
||
SOD3 |
Date |
✓ | |
SOD3 |
string |
✓ | [Column(Type |
SOD4 |
int? |
✓ | FK → App |
SOD4 |
bool |
||
SOD4 |
Date |
✓ | |
SOD4 |
string |
✓ | [Column(Type |
Cancel |
bool |
||
Cancel |
string |
✓ | [Column(Type |
Cancel |
Date |
✓ | |
Cancel |
int? |
✓ | FK → App |
Next |
int? |
✓ | FK → App |
Assigned |
int? |
✓ | FK → App |
Status |
int |
||
Refuse |
int? |
✓ | FK → App |
Is |
bool |
||
Refuse |
Date |
✓ | |
Refuse |
string |
✓ | |
Needed |
Date |
[Required] · [Column(Type |
|
Delivery |
string |
✓ | |
Delivery |
string |
✓ | |
Delivery |
string |
✓ | |
Delivery |
string |
✓ | |
Delivery |
string |
✓ | |
Purchase |
string |
✓ | |
Is |
bool |
||
Is |
bool |
||
Cat |
int? |
✓ | FK → Common |
Project |
int |
FK → Project |
|
PRSubmit |
int |
||
Currency |
int |
||
Tracker |
int? |
✓ | |
Deleted |
bool |
||
Created |
int |
FK → App |
|
Created |
Date |
Navigation: AppUserCreatedBy → AppUser, AppUserPM → AppUser, AppUserFO → AppUser, AppUserProcM → AppUser, AppUserSOD1 → AppUser, AppUserSOD2 → AppUser, AppUserSOD3 → AppUser, AppUserSOD4 → AppUser, AppUserNext → AppUser, AppUserRefuse → AppUser, AppUserCancel → AppUser, AppUserAssigned → AppUser, Project → Project, CommonMainCategory → CommonMainCategory, PurchaseOrders → ICollection<PurchaseOrder>, RFQs → ICollection<RFQs>
RFQJustifiedMat¶
DbSet RFQJustifiedMats
NKO.Lib/NKO.DataAccess/DbModel/RFQJustifiedMat.cs
erDiagram
RFQJustifiedMat {
int Id PK
}
| Column | Type | Null | Notes |
|---|---|---|---|
Id |
int |
PK | |
RFQId |
int |
||
RFQMat |
int |
||
Provider |
int |
||
Provider |
int |
RFQJustifiedProvider¶
DbSet RFQJustifiedProviders
NKO.Lib/NKO.DataAccess/DbModel/RFQJustifiedProvider.cs
erDiagram
RFQJustifiedProvider {
int Id PK
}
| Column | Type | Null | Notes |
|---|---|---|---|
Id |
int |
PK | |
New |
int |
||
Provider |
int |
RFQMat¶
[Table("RFQMat")]
NKO.Lib/NKO.DataAccess/DbModel/RFQMat.cs
erDiagram
direction LR
RFQMat {
int RFQMatId PK
int MatId FK
int RFQId FK
}
Materials {
int MaterialId PK
}
RFQs {
int RFQId PK
}
PurchaseOrderMat {
int PurchaseOrderMatId PK
int RFQMatId FK
}
RFQProviderMats {
int RFQProviderMatId PK
int RFQMatId FK
}
Materials ||--o{ RFQMat : "MatId"
RFQs ||--o{ RFQMat : "RFQId"
RFQMat ||--o{ PurchaseOrderMat : "RFQMatId"
RFQMat ||--o{ RFQProviderMats : "RFQMatId"
| Column | Type | Null | Notes |
|---|---|---|---|
RFQMat |
int |
PK | |
RFQId |
int |
FK → RFQs |
|
Mat |
int |
FK → Materials |
|
Base |
decimal? |
✓ | |
Base |
decimal? |
✓ |
Navigation: Materials → Materials, RFQs → RFQs, RFQProviderMats → ICollection<RFQProviderMats>, PurchaseOrderMats → ICollection<PurchaseOrderMat>
RFQProvider¶
[Table("RFQProvider")]
NKO.Lib/NKO.DataAccess/DbModel/RFQProvider.cs
erDiagram
direction LR
RFQProvider {
int RFQProviderId PK
int RFQId FK
int ProviderId FK
}
RFQs {
int RFQId PK
}
Provider {
int ProviderId PK
}
RFQProviderMats {
int RFQProviderMatId PK
int ProviderId FK
}
RFQProviderJustification {
int JustificationId PK
int ProviderId FK
}
PurchaseOrder {
int POId PK
int ProviderId FK
}
RFQs ||--o{ RFQProvider : "RFQId"
Provider |o--o{ RFQProvider : "ProviderId"
RFQProvider ||--o{ RFQProviderMats : "ProviderId"
RFQProvider ||--o{ RFQProviderJustification : "ProviderId"
RFQProvider ||--o{ PurchaseOrder : "ProviderId"
| Column | Type | Null | Notes |
|---|---|---|---|
RFQProvider |
int |
PK | |
REGProvider |
Guid |
||
RFQId |
int |
FK → RFQs |
|
Company |
string |
✓ | |
Contact |
string |
✓ | |
Position |
string |
✓ | |
Email |
string |
✓ | |
Phone |
string |
✓ | |
Mobile |
int |
||
Main |
string |
✓ | |
Fax |
string |
✓ | |
Mobile |
string |
✓ | |
Address |
string |
✓ | |
Payment |
string |
✓ | |
Delivery |
string |
✓ | |
Quote |
Date |
[Column(Type |
|
Lead |
Date |
[Column(Type |
|
Sale |
decimal? |
✓ | |
Delivery |
decimal? |
✓ | |
Other |
decimal? |
✓ | |
Is |
bool |
||
Is |
bool |
||
Justification |
string |
✓ | [Column(Type |
Other |
string |
✓ | |
Is |
bool |
||
Is |
bool |
||
Win |
int |
||
Account |
string |
✓ | |
Account |
string |
✓ | |
Account |
string |
✓ | |
Seq |
int? |
✓ | |
IP |
string |
✓ | |
Duration |
int |
||
Quality |
int |
||
Experience |
int |
||
Legality |
int |
||
Status |
int |
||
Created |
Date |
||
Provider |
int? |
✓ | FK → Provider |
Navigation: RFQs → RFQs, Provider → Provider, RFQProviderMats → ICollection<RFQProviderMats>, PurchaseOrders → ICollection<PurchaseOrder>, RFQProviderJustifications → ICollection<RFQProviderJustification>
RFQProviderJustification¶
DbSet RFQProviderJustifications
NKO.Lib/NKO.DataAccess/DbModel/RFQProviderJustification.cs
erDiagram
RFQProviderJustification {
int JustificationId PK
int ProviderId FK
int CreatedBy FK
int NextUserId FK
int RefusedBy FK
int CancelId FK
int SCId FK
int Com1Id FK
int Com2Id FK
int Com3Id FK
}
RFQProvider {
int RFQProviderId PK
}
AppUser {
int UserId PK
}
RFQProvider ||--o{ RFQProviderJustification : "ProviderId"
AppUser ||--o{ RFQProviderJustification : "CreatedBy"
AppUser |o--o{ RFQProviderJustification : "NextUserId, RefusedBy, CancelId +4 more"
| Column | Type | Null | Notes |
|---|---|---|---|
Justification |
int |
PK | |
Justification |
Guid |
||
Provider |
int |
FK → RFQProvider |
|
Seq |
int? |
✓ | |
Full |
string |
✓ | [String |
Po |
Date |
||
Provider |
bool |
||
Is |
bool |
||
Origin |
string |
✓ | |
Justification |
string |
✓ | |
Req |
bool |
||
Req |
Date |
✓ | |
Com1 |
int? |
✓ | FK → App |
Is |
bool |
||
Com1 |
Date |
✓ | |
Com1 |
string |
✓ | [String |
Com2 |
int? |
✓ | FK → App |
Is |
bool |
||
Com2 |
Date |
✓ | |
Com2 |
string |
✓ | [String |
Com3 |
int? |
✓ | FK → App |
Is |
bool |
||
Com3 |
Date |
✓ | |
Com3 |
string |
✓ | [String |
SCId |
int? |
✓ | FK → App |
Is |
bool |
||
SCDate |
Date |
✓ | |
SCNote |
string |
✓ | [String |
Next |
int? |
✓ | FK → App |
Status |
int |
||
Refused |
int? |
✓ | FK → App |
Refuse |
bool |
||
Refuse |
string |
✓ | [Column(Type |
Refuse |
Date |
✓ | |
Cancel |
bool |
||
Cancel |
string |
✓ | [Column(Type |
Cancel |
Date |
✓ | |
Cancel |
int? |
✓ | FK → App |
Deleted |
bool |
||
Created |
int |
FK → App |
|
Created |
Date |
Navigation: RFQProvider → RFQProvider, AppUserCreatedBy → AppUser, AppUserNext → AppUser, AppUserRefuse → AppUser, AppUserCancel → AppUser, AppUserSC → AppUser, AppUserCom1 → AppUser, AppUserCom2 → AppUser, AppUserCom3 → AppUser
RFQProviderMats¶
NKO.Lib/NKO.DataAccess/DbModel/RFQProviderMats.cs
erDiagram
RFQProviderMats {
int RFQProviderMatId PK
int RFQMatId FK
int ProviderId FK
}
RFQMat {
int RFQMatId PK
}
RFQProvider {
int RFQProviderId PK
}
RFQMat ||--o{ RFQProviderMats : "RFQMatId"
RFQProvider ||--o{ RFQProviderMats : "ProviderId"
| Column | Type | Null | Notes |
|---|---|---|---|
RFQProvider |
int |
PK | |
Provider |
int |
FK → RFQProvider |
|
RFQMat |
int |
FK → RFQMat |
|
Unit |
decimal |
||
Total |
decimal |
||
Country |
string |
✓ | |
Warranty |
string |
✓ | |
Valid |
Date |
✓ | |
Manufacturer |
string |
✓ | |
Model |
string |
✓ | |
Brand |
string |
✓ | |
Availability |
Date |
✓ | [Column(Type |
Is |
bool |
||
Is |
bool |
||
Mat |
decimal |
||
Price |
decimal |
||
Is |
bool |
||
Justification |
string |
✓ | |
Note |
string |
✓ |
Navigation: RFQMat → RFQMat, RFQProvider → RFQProvider
RFQTechnical¶
DbSet RFQTechnicals
NKO.Lib/NKO.DataAccess/DbModel/RFQTechnical.cs
erDiagram
RFQTechnical {
int RFQTechnicalId PK,FK
int TechCom1Id FK
int TechCom2Id FK
int TechCom3Id FK
int RefuseId FK
int CancelId FK
int NextUserId FK
}
AppUser {
int UserId PK
}
RFQs {
int RFQId PK
}
AppUser |o--o{ RFQTechnical : "TechCom1Id, TechCom2Id, TechCom3Id +3 more"
RFQs ||--o| RFQTechnical : "RFQTechnicalId"
| Column | Type | Null | Notes |
|---|---|---|---|
RFQTechnical |
int |
PK · FK → RFQs (1:1) · [Foreign |
|
RFQTechnical |
Guid |
||
Tech |
int? |
✓ | FK → App |
Is |
bool |
||
Tech |
Date |
✓ | |
Tech |
string |
✓ | [String |
Tech |
int? |
✓ | FK → App |
Is |
bool |
||
Tech |
Date |
✓ | |
Tech |
string |
✓ | [String |
Tech |
int? |
✓ | FK → App |
Is |
bool |
||
Tech |
Date |
✓ | |
Tech |
string |
✓ | [String |
General |
string |
✓ | |
Refuse |
int? |
✓ | FK → App |
Is |
bool |
||
Refuse |
Date |
✓ | |
Refuse |
string |
✓ | |
Cancel |
int? |
✓ | FK → App |
Is |
bool |
||
Cancel |
Date |
✓ | |
Cancel |
string |
✓ | |
Is |
bool |
||
Next |
int? |
✓ | FK → App |
Status |
int |
Navigation: AppUserTechCom1 → AppUser, AppUserTechCom2 → AppUser, AppUserTechCom3 → AppUser, AppUserRefuse → AppUser, AppUserCancel → AppUser, AppUserNext → AppUser, RFQ → RFQs
RFQs¶
NKO.Lib/NKO.DataAccess/DbModel/RFQs.cs
erDiagram
direction LR
RFQs {
int RFQId PK
int CreatedBy FK
int Com1Id FK
int Com2Id FK
int Com3Id FK
int RefuseId FK
int AllowedBy FK
int NextUserId FK
int ResponsibleId FK
int CancelId FK
int PMId FK
int PrId FK
}
AppUser {
int UserId PK
}
PurchaseRequest {
int PrId PK
}
RFQProvider {
int RFQProviderId PK
int RFQId FK
}
RFQMat {
int RFQMatId PK
int RFQId FK
}
CommitteeUser {
int CommitteeUserId PK
int RFQId FK
}
RFQTechnical {
int RFQTechnicalId PK,FK
}
AppUser ||--o{ RFQs : "CreatedBy, ResponsibleId"
AppUser |o--o{ RFQs : "Com1Id, Com2Id, Com3Id +5 more"
PurchaseRequest ||--o{ RFQs : "PrId"
RFQs ||--o{ RFQProvider : "RFQId"
RFQs ||--o{ RFQMat : "RFQId"
RFQs ||--o{ CommitteeUser : "RFQId"
RFQs ||--o| RFQTechnical : "RFQTechnicalId"
| Column | Type | Null | Notes |
|---|---|---|---|
RFQId |
int |
PK | |
RFQGuid |
Guid |
||
Pr |
int |
FK → Purchase |
|
Sent |
Date |
[Required] |
|
Due |
Date |
[Required] |
|
Reference |
bool |
[Required] |
|
Account |
bool |
[Required] |
|
Tech |
bool |
[Required] |
|
Justification |
string |
✓ | |
Responsible |
int |
FK → App · [Required] |
|
Com1 |
int? |
✓ | FK → App |
Is |
bool |
||
Com1 |
Date |
✓ | |
Com1 |
string |
✓ | [String |
Com2 |
int? |
✓ | FK → App |
Is |
bool |
||
Com2 |
Date |
✓ | |
Com2 |
string |
✓ | [String |
Com3 |
int? |
✓ | FK → App |
Is |
bool |
||
Com3 |
Date |
✓ | |
Com3 |
string |
✓ | [String |
Refuse |
int? |
✓ | FK → App |
Is |
bool |
||
Refuse |
Date |
✓ | |
Refuse |
string |
✓ | |
Cancel |
bool |
||
Cancel |
string |
✓ | [Column(Type |
Cancel |
Date |
✓ | |
Cancel |
int? |
✓ | FK → App |
PMId |
int? |
✓ | FK → App |
Is |
bool |
||
PMDate |
Date |
✓ | |
PMNote |
string |
✓ | [String |
Next |
int? |
✓ | FK → App |
Is |
bool |
||
Is |
bool |
||
Status |
int |
||
Is |
bool |
||
Allowed |
int? |
✓ | FK → App |
Allowed |
Date |
✓ | |
Is |
bool |
||
Is |
bool |
||
Ready |
Date |
✓ | |
Quotation |
int |
||
Price |
decimal |
||
Verify |
string |
✓ | |
Is |
bool |
||
Is |
bool |
||
Is |
bool |
||
Is |
bool |
||
Is |
bool |
||
Is |
bool |
||
Is |
bool |
||
Is |
bool |
||
Verification |
Date |
✓ | |
Tech |
decimal |
||
Scheduled |
string |
✓ | |
Analyse |
int |
||
Delivery |
string |
✓ | |
Analyse |
int |
[Required] |
|
Created |
int |
FK → App |
|
Created |
Date |
Navigation: AppUserCreatedBy → AppUser, AppUserCom1 → AppUser, AppUserCom2 → AppUser, AppUserCom3 → AppUser, AppUserRefuse → AppUser, AppUserAllowedBy → AppUser, AppUserNext → AppUser, AppUserResponsible → AppUser, AppUserCancel → AppUser, AppUserPM → AppUser, PurchaseRequest → PurchaseRequest, RFQTechnical → RFQTechnical, RFQMat → ICollection<RFQMat>, RFQProvider → ICollection<RFQProvider>, CommitteeUsers → ICollection<CommitteeUser>