S7 — ระบบคุ้มครองพยาน (Witness Protection) — Data Dictionary
ทุกตาราง/ทุกคอลัมน์ (โครงสร้างจาก live DB). กลับ ภาพรวม · machine-readable: schema.json
Area
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อพื้นที่ |
| Active |
bit |
|
สถานะใช้งาน |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
Soft delete |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
AttachFile
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| RefGuId |
uniqueidentifier |
NOT NULL |
GuId ของเอกสารที่อ้างอิง |
| Length |
int |
|
|
| Folder |
nvarchar(50) |
|
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| EncryptFileData |
nvarchar(max) |
|
|
AttachStatement
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| RefGuId |
uniqueidentifier |
NOT NULL |
GuId ของคำร้องที่อ้างอิง |
| Statement |
nvarchar(max) |
|
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
Budget
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| BudgetYearId |
int |
NOT NULL |
FK → BudgetYear.Id |
| BudgetTypeId |
int |
NOT NULL |
FK → BudgetType.Id |
| Name |
nvarchar(255) |
NOT NULL |
|
| Amount |
decimal(18,0) |
DEFAULT 0, NOT NULL |
จำนวนงบประมาณ |
| Remark |
nvarchar(max) |
|
หมายเหตุ |
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
BudgetType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อประเภท |
| Active |
bit |
DEFAULT 1, NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Description |
nvarchar(1550) |
|
|
BudgetYear
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
int |
NOT NULL |
|
| Active |
bit |
DEFAULT 1, NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| BudgetTypeId |
int |
NOT NULL |
|
| Budget |
decimal(18,2) |
NOT NULL |
|
| ExpenseEstimate |
decimal(18,2) |
NOT NULL |
|
| Expense |
decimal(18,2) |
NOT NULL |
|
| Balance |
decimal(18,2) |
NOT NULL |
|
CaseType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(1500) |
|
ชื่อประเภทคดี |
| Description |
nvarchar(1500) |
|
|
| Active |
bit |
DEFAULT 1, NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
Department
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อหน่วยงาน |
| ParentId |
int |
|
|
| Address |
nvarchar(500) |
|
|
| TelephoneNO |
nvarchar(50) |
|
|
| MobileNO |
nvarchar(50) |
|
|
| FaxNO |
nvarchar(50) |
|
|
| ProvinceID |
int |
|
|
| DistrictID |
int |
|
|
| SubDistrictID |
int |
|
|
| Active |
bit |
DEFAULT 0, NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
District
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid() |
|
| Code |
nvarchar(10) |
|
|
| Name |
nvarchar(50) |
|
ชื่ออำเภอ |
| NameEn |
nvarchar(50) |
|
|
| ProvinceCode |
nvarchar(10) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
DEFAULT 1, NOT NULL |
|
Document13
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| SceneAddress |
nvarchar(255) |
|
|
| SceneAddressProvinceCode |
nvarchar(10) |
|
|
| SceneAddressDistrictCode |
nvarchar(10) |
|
|
| SceneAddressSubDistrictCode |
nvarchar(10) |
|
|
| SceneAddressZipCode |
nvarchar(10) |
|
|
| SceneAddressPhoneNumber |
nvarchar(50) |
|
|
| PoliceStationAddress |
nvarchar(255) |
|
|
| PoliceStationAddressProvinceCode |
nvarchar(10) |
|
|
| PoliceStationAddressDistrictCode |
nvarchar(10) |
|
|
| PoliceStationAddressSubDistrictCode |
nvarchar(10) |
|
|
| PoliceStationAddressZipCode |
nvarchar(10) |
|
|
| PoliceStationAddressPhoneNumber |
nvarchar(50) |
|
|
| ConclusionAppendantNote |
nvarchar(max) |
|
|
| SceneDate |
datetime |
|
|
| TmWitnessStatusId |
int |
|
|
| CriminalStatus |
nvarchar(255) |
|
|
| TmWitnessStatusIdEtc |
nvarchar(255) |
|
|
DxcServicesApi
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(250) |
NOT NULL |
|
| Endpoint |
nvarchar(250) |
NOT NULL |
|
| Method |
nvarchar(5) |
NOT NULL |
|
| AcceptType |
nvarchar(50) |
NOT NULL |
|
| DataType |
nvarchar(50) |
|
|
| ContentType |
nvarchar(50) |
|
|
| IsReplaceParam |
bit |
DEFAULT 0, NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
DEFAULT 1, NOT NULL |
Audit + Soft Delete |
| Guid |
uniqueidentifier |
NOT NULL |
|
| IsLinkage |
bit |
DEFAULT 0, NOT NULL |
|
DxcServicesParamMap
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| DxcServiceId |
int |
NOT NULL |
|
| ParamName |
nvarchar(50) |
DEFAULT 0, NOT NULL |
ชื่อ Parameter |
| DataType |
int |
|
|
Expense
| Column |
Data Type |
Constraints |
Description |
| ExpenseId |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
NOT NULL |
|
| ExpenseSaveTypeId |
int |
NOT NULL |
|
| RefNo |
nvarchar(255) |
|
|
| GF |
nvarchar(20) |
|
|
| BudgetYearId |
int |
NOT NULL |
|
| BudgetTypeId |
int |
NOT NULL |
|
| PetitionCompensationId |
uniqueidentifier |
|
|
| PetitionGuIdPetitionProtectionOrder |
uniqueidentifier |
|
|
| ExpenseAmount |
decimal(18,2) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedId |
int |
|
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| StartDate |
datetime |
|
|
| EndDate |
datetime |
|
|
| ExpenseCutOffTypeId |
int |
NOT NULL |
|
| RefNoText |
nvarchar(500) |
|
|
| GuIdRefFileUpload |
uniqueidentifier |
NOT NULL |
|
ExpenseCategory
| Column |
Data Type |
Constraints |
Description |
| ExpenseCategoryId |
int |
PK |
|
| ExpenseCategoryName |
nvarchar(250) |
NOT NULL |
|
| ExpenseSaveType |
int |
NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
DEFAULT 1, NOT NULL |
Audit + Soft Delete |
| Orders |
int |
|
|
| ParentId |
int |
|
|
ExpenseCategory_copy
| Column |
Data Type |
Constraints |
Description |
| ExpenseCategoryId |
int |
PK |
|
| ExpenseCategoryName |
nvarchar(250) |
NOT NULL |
|
| ExpenseSaveType |
int |
NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
DEFAULT 1, NOT NULL |
Audit + Soft Delete |
| Orders |
int |
|
|
| ParentId |
int |
|
|
ExpenseCutOffType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nchar(255) |
|
ชื่อประเภท |
| Description |
nchar(500) |
|
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
ExpenseDetails
| Column |
Data Type |
Constraints |
Description |
| ExpenseDetailId |
int |
PK, IDENTITY |
|
| ExpenseGuId |
uniqueidentifier |
NOT NULL |
|
| ProtectionRelatePersonId |
int |
|
|
| WitnessId |
int |
|
|
| ExpenseTypeId |
int |
NOT NULL |
FK → ExpenseType.Id |
| ExpenseTypeUnit1Count |
decimal(18,2) |
|
|
| ExpenseTypeUnit1_Name |
nvarchar(200) |
|
|
| ExpenseTypeUnit2Count |
decimal(18,2) |
|
|
| ExpenseTypeUnit2_Name |
nvarchar(200) |
|
|
| ExpenseTypeUnit3Count |
decimal(18,2) |
|
|
| ExpenseTypeUnit3_Name |
nvarchar(200) |
|
|
| ExpenseTypeUnitCost |
decimal(18,2) |
|
|
| ExpenseCategoryId |
int |
NOT NULL |
|
| ExpensePersonAmount |
decimal(18,2) |
|
|
| ExpenseCategoryAmount |
decimal(18,2) |
|
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| ExpenseTypeCost |
decimal(18,2) |
|
|
| WitnessGuId |
uniqueidentifier |
|
|
| TmProtectionTeamId |
int |
|
|
| UserId |
int |
|
|
| UserExternalId |
int |
|
|
| DepartmentId |
int |
|
|
| ActualExpenses |
decimal(18,2) |
|
|
ExpenseDetails__Estimate
| Column |
Data Type |
Constraints |
Description |
| ExpenseDetailEstimateId |
int |
PK, IDENTITY |
|
| ExpenseGuId |
uniqueidentifier |
NOT NULL |
|
| ProtectionRelatePersonId |
int |
|
|
| WitnessId |
int |
|
|
| ExpenseTypeId |
int |
NOT NULL |
FK → ExpenseType.Id |
| ExpenseTypeUnit1Count |
decimal(18,2) |
|
|
| ExpenseTypeUnit1_Name |
nvarchar(200) |
|
|
| ExpenseTypeUnit2Count |
decimal(18,2) |
|
|
| ExpenseTypeUnit2_Name |
nvarchar(200) |
|
|
| ExpenseTypeUnit3Count |
decimal(18,2) |
|
|
| ExpenseTypeUnit3_Name |
nvarchar(200) |
|
|
| ExpenseTypeUnitCost |
decimal(18,2) |
|
|
| ExpenseCategoryId |
int |
NOT NULL |
|
| ExpensePersonAmount |
decimal(18,2) |
|
|
| ExpenseCategoryAmount |
decimal(18,2) |
|
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| ExpenseTypeCost |
decimal(18,2) |
|
|
| WitnessGuId |
uniqueidentifier |
|
|
| TmProtectionTeamId |
int |
|
|
| UserId |
int |
|
|
| UserExternalId |
int |
|
|
| DepartmentId |
int |
|
|
ExpenseMaster
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(200) |
NOT NULL |
ชื่อรายการ |
| Unitflag |
int |
|
|
ExpenseType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อประเภท |
| Description |
nvarchar(max) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| Unit1 |
int |
NOT NULL |
|
| Unit2 |
int |
|
|
| Unit3 |
int |
|
|
| MaxCost |
decimal(18,2) |
|
|
| Type |
nvarchar(50) |
NOT NULL |
|
| IsDeath |
bit |
NOT NULL |
|
Expense_Estimate
| Column |
Data Type |
Constraints |
Description |
| ExpenseEstimateId |
int |
PK, IDENTITY |
|
| IsCleared |
bit |
DEFAULT 0, NOT NULL |
|
| ExpenseSaveTypeId |
int |
NOT NULL |
|
| RefNo |
nvarchar(255) |
|
|
| GF |
nvarchar(20) |
|
|
| BudgetYearId |
int |
NOT NULL |
|
| BudgetTypeId |
int |
NOT NULL |
|
| PetitionCompensationId |
uniqueidentifier |
|
|
| PetitionGuIdNextPetitionProtectionOrder |
uniqueidentifier |
|
|
| ExpenseAmount |
decimal(18,0) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedId |
int |
|
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| StartDate |
datetime |
|
|
| EndDate |
datetime |
|
|
| ExpenseCutOffTypeId |
int |
NOT NULL |
|
| GuId |
uniqueidentifier |
NOT NULL |
|
| RefNoText |
nvarchar(500) |
|
|
| GuIdRefFileUpload |
uniqueidentifier |
NOT NULL |
|
Honorable_Meeting_Agenda
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| UsersHonorableId |
int |
NOT NULL |
FK → Users_Honorable.Id |
| PetitionId |
int |
NOT NULL |
FK → PetitionProtection.Id |
| Considerations |
nvarchar(max) |
|
|
| ApprovedDate |
datetime |
|
|
| opinion |
nvarchar(500) |
|
|
| notes |
nvarchar(500) |
|
|
| StartDate |
datetime |
NOT NULL |
|
| EndDate |
datetime |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
FK → Users.Id |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
FK → Users.Id |
| UpdatedDate |
datetime |
NOT NULL |
|
| DeletedDate |
datetime |
|
Soft delete |
Foreign Keys: CreatedId → Users.Id; PetitionId → PetitionProtection.Id; UpdatedId → Users.Id; UsersHonorableId → Users_Honorable.Id
LegalProcess
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| LegalProcessTitle |
nvarchar(255) |
NOT NULL |
|
| LegalProcessDesc |
nvarchar(max) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| Active |
bit |
DEFAULT 1, NOT NULL |
|
| Orders |
int |
DEFAULT 0, NOT NULL |
|
LegalProcessFollowUp
| Column |
Data Type |
Constraints |
Description |
| LegalProcessFollowUpId |
int |
PK, IDENTITY |
|
| LegalProcessId |
int |
NOT NULL |
FK → LegalProcess.Id |
| LegalProcessFollowUpTitle |
nvarchar(255) |
NOT NULL |
|
| LegalProcessFollowUpDesc |
nvarchar(max) |
|
|
| LegalProcessStatusId |
int |
NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| TraceCaseId |
uniqueidentifier |
NOT NULL |
|
| Guid |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| PetitionType |
int |
DEFAULT 1, NOT NULL |
|
| DeletedDate |
datetime |
|
Audit + Soft Delete |
LegalProcessStatus
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อสถานะ |
| Description |
nvarchar(max) |
|
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| Active |
bit |
DEFAULT 1, NOT NULL |
|
| Orders |
int |
DEFAULT 0, NOT NULL |
|
LogActivitiesDXC
| Column |
Data Type |
Constraints |
Description |
| ID |
int |
PK |
รหัสอ้างอิง |
| CardID_Complain |
int |
|
|
| function_access |
nvarchar(100) |
|
|
| process |
nvarchar(30) |
|
|
| process_date |
datetime |
|
|
| accessby |
nvarchar(100) |
|
|
| accessbyName |
nvarchar(100) |
|
|
| device |
nvarchar(100) |
|
|
| browser |
nvarchar(100) |
|
|
| Keygen |
nvarchar(100) |
|
|
LogCallServiceCenter
| Column |
Data Type |
Constraints |
Description |
| ID |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| DateCallService |
datetime |
NOT NULL |
|
| Issuccess |
bit |
NOT NULL |
|
| CountDataSevice |
int |
NOT NULL |
|
| CountDataAdd |
int |
NOT NULL |
|
| CountDataDuplicate |
int |
NOT NULL |
|
| ErrorMsg |
nvarchar(1000) |
|
|
| CreateDate |
datetime |
NOT NULL |
|
LogChangeProtectedDate
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| RefGuId |
uniqueidentifier |
NOT NULL |
|
| OrderCode |
nvarchar(50) |
|
|
| InitialProtectedDate |
datetime |
NOT NULL |
|
| EndProtectedDate |
datetime |
NOT NULL |
|
| Comment |
nvarchar(255) |
|
|
| Active |
bit |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate() |
|
| UpdatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate() |
|
| DeletedDate |
datetime |
|
|
LogGetApi
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| CallFrom |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
|
|
| Controller |
nvarchar(50) |
|
|
| Action |
nvarchar(50) |
|
|
| Status |
nvarchar(50) |
|
สถานะ |
| NumberOfData |
int |
|
|
| ErrorMsg |
nvarchar(max) |
|
|
LogMscSetApi
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Msg |
nvarchar(max) |
|
|
| Url |
nvarchar(max) |
|
|
| CreatedDate |
datetime |
|
|
| DeletedDate |
datetime |
|
|
| Username |
nvarchar(50) |
|
|
| Password |
nvarchar(50) |
|
|
| Pid |
nvarchar(50) |
|
|
| ReptStatus |
nvarchar(100) |
|
|
| ReptPlainText |
nvarchar(max) |
|
|
| Status |
nvarchar(50) |
|
สถานะ |
| ProcessName |
nvarchar(255) |
|
|
| StatusProcessName |
nvarchar(255) |
|
|
LogPetitionProcess
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| RefGuId |
uniqueidentifier |
NOT NULL |
|
| Comment |
nvarchar(max) |
|
|
| ProcessName |
nvarchar(50) |
|
|
| ThaiProcessName |
nvarchar(100) |
|
|
| StatusProcessName |
nvarchar(50) |
|
|
| ThaiStatusProcessName |
nvarchar(100) |
|
|
| GuIdPetitionProtectionOrder |
uniqueidentifier |
|
|
| GuIdPetitionProtectionOrderApproved |
uniqueidentifier |
|
|
| GuIdNextPetitionProtectionOrder |
uniqueidentifier |
|
|
| Active |
bit |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate() |
|
| UpdatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate() |
|
| DeletedDate |
datetime |
|
|
Log_Activity
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| ClientIp |
nvarchar(250) |
|
|
| Path |
nvarchar(4000) |
|
|
| UserName |
nvarchar(250) |
|
|
| Action |
nvarchar(150) |
|
การกระทำ |
| Method |
nvarchar(10) |
|
|
| Response |
nvarchar(max) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| FullName |
nvarchar(max) |
|
|
| MenuName |
nvarchar(max) |
|
|
| Controller |
nvarchar(max) |
|
|
Map2
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
|
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
|
|
| Code |
nvarchar(10) |
|
|
| Name |
nvarchar(50) |
|
|
| NameEn |
nvarchar(50) |
|
|
| ProvinceCode |
nvarchar(10) |
|
|
MapPetitionProtection
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
|
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
|
|
| GuIdInSecureAction |
uniqueidentifier |
|
|
| GuIdAppendantNote |
uniqueidentifier |
|
|
| PetitionType |
int |
|
|
| CreatedId |
int |
|
|
| PetitionerId |
int |
|
|
| WitnessId |
int |
|
|
| ProtectionPurposeId |
int |
|
|
| Document13Id |
int |
|
|
| ProcessName |
nvarchar(50) |
|
|
| ScThaiProcessName |
nvarchar(100) |
|
|
| StatusProcessName |
nvarchar(50) |
|
|
| ScThaiStatusProcessName |
nvarchar(100) |
|
|
| Active |
bit |
|
|
| DeletedDate |
datetime |
|
|
| CreatedDate |
datetime |
|
|
| UpdatedDate |
datetime |
|
|
| UpdatedId |
int |
|
|
| ScReceivedCode |
nvarchar(20) |
|
|
| ScCriminalCode |
nvarchar(50) |
|
|
| ScPetitionerFullNameEncrypt |
nvarchar(max) |
|
|
| ScWitnessFullNameEncrypt |
nvarchar(max) |
|
|
| ScProtectionRelatePersonCount |
int |
|
|
| ScPetitionUnitOwnerName |
nvarchar(100) |
|
|
| ScPetitionUserOwnerCount |
int |
|
|
| ScSendDateStr |
nvarchar(50) |
|
|
| GuIdProtectionBudget |
uniqueidentifier |
|
|
| InitialProtectedDate |
datetime |
|
|
| EndProtectedDate |
datetime |
|
|
| ScPetitionerSendDate |
datetime |
|
|
| ScReasonToEndOfProtectName |
nvarchar(255) |
|
|
| ScreeningPetitionOwnerId |
int |
|
|
| GuIdPetitionFile |
uniqueidentifier |
|
|
| ApproveProtectPlaceByDirector |
bit |
|
|
| OrderCodeToEndOfApprove |
nvarchar(50) |
|
|
| OrderCodeToEndOfProtect |
nvarchar(50) |
|
|
| CaseIDServiceCenter |
nvarchar(50) |
|
|
| GuIdOtherFile |
uniqueidentifier |
|
|
| InitPetitionProtectionOrderCount |
int |
|
|
| InitPetitionProtectionOrderApprovedCount |
int |
|
|
| GuIdPetitionProtectionOrder |
uniqueidentifier |
|
|
| GuIdNextPetitionProtectionOrder |
uniqueidentifier |
|
|
| GuIdPetitionProtectionOrderApproved |
uniqueidentifier |
|
|
| HadProtected |
bit |
|
|
| MSCID |
nvarchar(50) |
|
|
| Derived Column 1 |
uniqueidentifier |
|
|
| Derived Column 2 |
nvarchar(50) |
|
|
MeetingRoom
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อห้องประชุม |
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
MeetingRoomOnAgenda
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| MeetingDescription |
nvarchar(255) |
NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| MeetingRoomId |
int |
|
FK → MeetingRoom.Id |
| MeetingDate |
datetime |
|
วันที่ประชุม |
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
IDENTITY, NOT NULL |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
|
ชื่อเมนู |
| Description |
nvarchar(500) |
|
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate() |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate() |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| ParentMenuId |
int |
|
|
| Sequence |
int |
|
|
| Icon |
nvarchar(255) |
|
ไอคอน |
| Action |
nvarchar(255) |
|
|
| Controller |
nvarchar(255) |
|
|
| MenuType |
int |
|
|
Notification
| Column |
Data Type |
Constraints |
Description |
| NotificationId |
uniqueidentifier |
PK |
|
| CaseId |
uniqueidentifier |
NOT NULL |
|
| NotificationType |
int |
NOT NULL |
|
| UserId |
int |
NOT NULL |
FK → Users.Id |
| ReadDateTime |
datetime |
|
|
| CreateDateTime |
datetime |
NOT NULL |
|
NotificationType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(200) |
NOT NULL |
ชื่อประเภท |
| Topic |
nvarchar(max) |
|
|
| Description |
nvarchar(max) |
|
|
OLE DB Destination
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
|
|
| GuId |
uniqueidentifier |
|
|
| GuIdInSecureAction |
uniqueidentifier |
|
|
| GuIdAppendantNote |
uniqueidentifier |
|
|
| PetitionType |
int |
|
|
| CreatedId |
int |
|
|
| PetitionerId |
int |
|
|
| WitnessId |
int |
|
|
| ProtectionPurposeId |
int |
|
|
| Document13Id |
int |
|
|
| ProcessName |
nvarchar(50) |
|
|
| ScThaiProcessName |
nvarchar(100) |
|
|
| StatusProcessName |
nvarchar(50) |
|
|
| ScThaiStatusProcessName |
nvarchar(100) |
|
|
| Active |
bit |
|
|
| DeletedDate |
datetime |
|
|
| CreatedDate |
datetime |
|
|
| UpdatedDate |
datetime |
|
|
| UpdatedId |
int |
|
|
| ScReceivedCode |
nvarchar(20) |
|
|
| ScCriminalCode |
nvarchar(50) |
|
|
| ScPetitionerFullNameEncrypt |
nvarchar(max) |
|
|
| ScWitnessFullNameEncrypt |
nvarchar(max) |
|
|
| ScProtectionRelatePersonCount |
int |
|
|
| ScPetitionUnitOwnerName |
nvarchar(100) |
|
|
| ScPetitionUserOwnerCount |
int |
|
|
| ScSendDateStr |
nvarchar(50) |
|
|
| GuIdProtectionBudget |
uniqueidentifier |
|
|
| InitialProtectedDate |
datetime |
|
|
| EndProtectedDate |
datetime |
|
|
| ScPetitionerSendDate |
datetime |
|
|
| ScReasonToEndOfProtectName |
nvarchar(255) |
|
|
| ScreeningPetitionOwnerId |
int |
|
|
| GuIdPetitionFile |
uniqueidentifier |
|
|
| ApproveProtectPlaceByDirector |
bit |
|
|
| OrderCodeToEndOfApprove |
nvarchar(50) |
|
|
| OrderCodeToEndOfProtect |
nvarchar(50) |
|
|
| CaseIDServiceCenter |
nvarchar(50) |
|
|
| GuIdOtherFile |
uniqueidentifier |
|
|
| InitPetitionProtectionOrderCount |
int |
|
|
| InitPetitionProtectionOrderApprovedCount |
int |
|
|
| GuIdPetitionProtectionOrder |
uniqueidentifier |
|
|
| GuIdNextPetitionProtectionOrder |
uniqueidentifier |
|
|
| GuIdPetitionProtectionOrderApproved |
uniqueidentifier |
|
|
| HadProtected |
bit |
|
|
| MSCID |
nvarchar(50) |
|
|
| Derived Column 1 |
uniqueidentifier |
|
|
| Derived Column 2 |
nvarchar(50) |
|
|
OTP
| Column |
Data Type |
Constraints |
Description |
| OTPID |
int |
PK, IDENTITY |
|
| OTPRef |
nvarchar(6) |
NOT NULL |
|
| OTPNo |
nvarchar(6) |
NOT NULL |
|
| MobileNo |
nvarchar(20) |
NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| ExpireDate |
datetime |
NOT NULL |
|
Offense
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(1500) |
|
ชื่อฐานความผิด |
| Description |
nvarchar(1500) |
|
|
| Active |
bit |
NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Orders |
int |
DEFAULT 1, NOT NULL |
|
| CaseTypeId |
int |
DEFAULT 0 |
|
PetitionCompensation
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| GuIdInSecureAction |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| GuIdAppendantNote |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| PetitionType |
int |
NOT NULL |
|
| StatusCode |
int |
|
|
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| PetitionerId |
int |
|
|
| WitnessId |
int |
|
|
| PetitionDamageAndClaimsId |
int |
|
|
| ProtectionPurposeId |
int |
|
|
| Document13Id |
int |
|
|
| ProcessName |
nvarchar(50) |
NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| ScReceivedCode |
nvarchar(20) |
|
|
| ScCriminalCode |
nvarchar(20) |
|
|
| ScPetitionerFullNameEncrypt |
nvarchar(max) |
|
|
| ScWitnessFullNameEncrypt |
nvarchar(max) |
|
|
| ScProtectionRelatePersonCount |
int |
|
|
| ScThaiProcessName |
nvarchar(100) |
|
|
| ScPetitionUnitOwnerName |
nvarchar(100) |
|
|
| ScPetitionUserOwnerCount |
int |
|
|
| ScSendDateStr |
nvarchar(50) |
|
|
| GuIdProtectionBudget |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| ScProtectionPeriod |
int |
|
|
| ScEndProtectedDate |
datetime |
|
|
| InitialProtectedDate |
datetime |
|
|
| EndProtectedDate |
datetime |
|
|
| GuIdPetitionFile |
uniqueidentifier |
NOT NULL |
|
| ScPetitionerSendDate |
datetime |
|
|
| ScWitnessCitizenCardNumber |
nvarchar(13) |
|
|
| ScWitnessPassportNumber |
nvarchar(25) |
|
|
| GuIdOtherFile |
uniqueidentifier |
NOT NULL |
|
PetitionDamageAndClaims
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DamagedDate |
datetime |
|
|
| DamagedRemark |
nvarchar(max) |
NOT NULL |
|
| RequestCompensationWith |
uniqueidentifier |
|
|
| TitleId |
int |
|
|
| NameEncrypt |
nvarchar(max) |
|
|
| LastNameEncrypt |
nvarchar(max) |
|
|
| life |
nvarchar(max) |
|
|
| body |
nvarchar(max) |
|
|
| Health |
nvarchar(max) |
|
|
| freedom |
nvarchar(max) |
|
|
| reputation |
nvarchar(max) |
|
|
| asset |
nvarchar(max) |
|
|
| SomeRights |
nvarchar(max) |
|
|
PetitionFromPortal
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| PetitionId |
int |
|
|
| PetitionPortalId |
nvarchar(255) |
|
|
PetitionProtection
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสคำร้อง |
| GuId |
uniqueidentifier |
NOT NULL |
Global Unique Identifier |
| GuIdInSecureAction |
uniqueidentifier |
NOT NULL |
|
| GuIdAppendantNote |
uniqueidentifier |
NOT NULL |
|
| PetitionType |
int |
NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
FK → Users.Id |
| PetitionerId |
int |
|
|
| WitnessId |
int |
|
|
| ProtectionPurposeId |
int |
|
|
| Document13Id |
int |
|
|
| ProcessName |
nvarchar(50) |
NOT NULL |
สถานะ Workflow (state machine) |
| ScThaiProcessName |
nvarchar(100) |
|
|
| StatusProcessName |
nvarchar(50) |
|
|
| ScThaiStatusProcessName |
nvarchar(100) |
|
|
| Active |
bit |
NOT NULL |
สถานะใช้งาน |
| DeletedDate |
datetime |
|
Soft delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
FK → Users.Id |
| ScReceivedCode |
nvarchar(20) |
|
|
| ScCriminalCode |
nvarchar(50) |
|
|
| ScPetitionerFullNameEncrypt |
nvarchar(max) |
|
|
| ScWitnessFullNameEncrypt |
nvarchar(max) |
|
|
| ScProtectionRelatePersonCount |
int |
|
|
| ScPetitionUnitOwnerName |
nvarchar(100) |
|
|
| ScPetitionUserOwnerCount |
int |
|
|
| ScSendDateStr |
nvarchar(50) |
|
|
| GuIdProtectionBudget |
uniqueidentifier |
NOT NULL |
|
| InitialProtectedDate |
datetime |
|
|
| EndProtectedDate |
datetime |
|
|
| ScPetitionerSendDate |
datetime |
|
|
| ScReasonToEndOfProtectName |
nvarchar(255) |
|
|
| ScreeningPetitionOwnerId |
int |
|
|
| GuIdPetitionFile |
uniqueidentifier |
NOT NULL |
|
| ApproveProtectPlaceByDirector |
bit |
|
|
| OrderCodeToEndOfApprove |
nvarchar(max) |
|
|
| OrderCodeToEndOfProtect |
nvarchar(50) |
|
|
| CaseIDServiceCenter |
nvarchar(50) |
|
|
| GuIdOtherFile |
uniqueidentifier |
NOT NULL |
|
| InitPetitionProtectionOrderCount |
int |
NOT NULL |
|
| InitPetitionProtectionOrderApprovedCount |
int |
NOT NULL |
|
| GuIdPetitionProtectionOrder |
uniqueidentifier |
NOT NULL |
|
| GuIdNextPetitionProtectionOrder |
uniqueidentifier |
NOT NULL |
|
| GuIdPetitionProtectionOrderApproved |
uniqueidentifier |
NOT NULL |
|
| HadProtected |
bit |
|
|
| MSCID |
nvarchar(50) |
|
|
PetitionProtectionOrder
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
NOT NULL |
|
| GuIdPetitionProtection |
uniqueidentifier |
NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| InitialProtectedDate |
datetime |
|
|
| EndProtectedDate |
datetime |
|
|
| OrderCodeToEndOfApprove |
nvarchar(500) |
|
|
| OrderCodeToEndOfProtect |
nvarchar(50) |
|
|
| GuIdExpenseEstimateFile |
uniqueidentifier |
NOT NULL |
|
PetitionProtectionOrderApproved
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
NOT NULL |
|
| GuIdPetitionProtection |
uniqueidentifier |
NOT NULL |
|
| GuIdPetitionProtectionOrder |
uniqueidentifier |
NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| LawyerSuggestingId |
int |
|
|
| LawyerSuggestingIdEtc |
nvarchar(max) |
|
|
| LawyerSuggestingDetail |
nvarchar(max) |
|
|
| ReasonToEndOfProtectId |
int |
|
|
| MeetingRoomOnAgendaId |
int |
|
|
| TmResolutionOnAgendaId |
int |
|
|
| TmResolutionOnAgendaIdEtc |
nvarchar(255) |
|
|
| ResolutionOnAgendaDate |
datetime |
|
|
| IsSkipAgenda |
bit |
|
|
| TmProtectPlaceId |
int |
|
|
| TmProtectPlaceIdEtc |
nvarchar(255) |
|
|
| TmWaitToApproveByDirectorId |
int |
|
|
| TmWaitToApproveByDirectorDetail |
nvarchar(max) |
|
|
| TmWaitToApproveByDirectorDeputyGeneralId |
int |
|
|
| TmWaitToApproveByDirectorDeputyGeneralDetail |
nvarchar(max) |
|
|
| TmWaitToApproveByDirectorGeneralId |
int |
|
|
| TmWaitToApproveByDirectorGeneralDetail |
nvarchar(max) |
|
|
| TmWaitToApproveByMinisterId |
int |
|
|
| TmWaitToApproveByMinisterDetail |
nvarchar(max) |
|
|
| ApprovedDate |
datetime |
|
วันที่อนุมัติ |
| ProcessName |
nvarchar(50) |
NOT NULL |
|
Petitioner
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| TmRelatePositionId |
int |
NOT NULL |
|
| TmRelatePositionIdEtc |
nvarchar(255) |
|
|
| TitleId |
int |
|
FK → Title.Id |
| NameEncrypt |
nvarchar(max) |
|
|
| LastNameEncrypt |
nvarchar(max) |
|
นามสกุล (เข้ารหัส PII) |
| BirthDate |
datetime |
|
|
| ReligionId |
int |
|
|
| RaceId |
int |
|
|
| NationalityId |
int |
|
FK → Tm_Nationality.Id |
| BloodTypeId |
int |
|
|
| CongenitalDisease |
nvarchar(255) |
|
|
| HistoryOfAllergy |
nvarchar(255) |
|
|
| FatherTitleId |
int |
|
|
| FatherNameEncrypt |
nvarchar(max) |
|
|
| FatherLastNameEncrypt |
nvarchar(max) |
|
|
| FatherBirthDate |
datetime |
|
|
| MotherTitleId |
int |
|
|
| MotherNameEncrypt |
nvarchar(max) |
|
|
| MotherLastNameEncrypt |
nvarchar(max) |
|
|
| MotherBirthDate |
datetime |
|
|
| AddressEncrypt |
nvarchar(max) |
|
|
| AddressProvinceCode |
nvarchar(10) |
|
|
| AddressDistrictCode |
nvarchar(10) |
|
|
| AddressSubDistrictCode |
nvarchar(10) |
|
|
| AddressZipCode |
nvarchar(10) |
|
|
| AddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| WorkAddressEncrypt |
nvarchar(max) |
|
|
| WorkAddressProvinceCode |
nvarchar(10) |
|
|
| WorkAddressDistrictCode |
nvarchar(10) |
|
|
| WorkAddressSubDistrictCode |
nvarchar(10) |
|
|
| WorkAddressZipCode |
nvarchar(10) |
|
|
| WorkAddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| CitizenCardNumberEncrypt |
nvarchar(max) |
|
|
| PassportNumberEncrypt |
nvarchar(max) |
|
|
| OfficerCardNumberEncrypt |
nvarchar(max) |
|
|
| SubjectOfficer |
nvarchar(50) |
|
|
| IssueDate |
datetime |
|
|
| ExpireDate |
datetime |
|
|
| PetitionerSendDate |
datetime |
|
|
| TmCareerId |
int |
|
|
| TmCareerIdEtc |
nvarchar(255) |
|
|
| TmMaritalStatusId |
int |
|
|
| TmMaritalStatusIdEtc |
int |
|
|
| OriginAddressEncrypt |
nvarchar(max) |
|
|
| OriginAddressProvinceCode |
nvarchar(10) |
|
|
| OriginAddressDistrictCode |
nvarchar(10) |
|
|
| OriginAddressSubDistrictCode |
nvarchar(10) |
|
|
| OriginAddressZipCode |
nvarchar(10) |
|
|
| OriginAddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| TmSendPlaceId |
int |
|
|
| TmSendPlaceIdEtc |
nvarchar(255) |
|
|
| TmSendPlaceProvinceCode |
nvarchar(10) |
|
|
| IsAddressSameOriginAddress |
bit |
NOT NULL |
|
PetitionsUsersOwner
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| PetitionId |
int |
NOT NULL |
|
| UserId |
int |
NOT NULL |
FK → Users.Id |
PrintFileVersion
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| RefGuId |
uniqueidentifier |
NOT NULL |
GuId ของเอกสารที่อ้างอิง |
| PetitionType |
int |
NOT NULL |
|
| VersionNumber |
int |
NOT NULL |
|
| IsLatestVersion |
bit |
DEFAULT 1, NOT NULL |
|
| PrintedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| Length |
int |
|
|
| Folder |
varchar(50) |
|
|
| Active |
bit |
DEFAULT 1, NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| EncryptFileData |
varchar(max) |
|
|
| Remark |
varchar(500) |
|
|
ProtectionBudgetAllocate
| Column |
Data Type |
Constraints |
Description |
| ProtectionBudgetAllocateID |
int |
PK, IDENTITY |
|
| ProtectionRequestID |
int |
|
|
| PetitionProtectionId |
uniqueidentifier |
NOT NULL |
FK → PetitionProtection.Id |
| ExpenseID |
int |
NOT NULL |
|
| ExpenseCategoryID |
int |
NOT NULL |
|
| ExpenseTypeID |
int |
NOT NULL |
|
| ExpensePerDayAmount |
decimal(18,0) |
DEFAULT 0, NOT NULL |
|
| Days |
int |
DEFAULT 0, NOT NULL |
|
| ExpenseTypeCost |
int |
|
|
| ExpenseAmount |
decimal(18,0) |
DEFAULT 0, NOT NULL |
|
| ExpenseBalance |
decimal(18,0) |
DEFAULT 0, NOT NULL |
|
| CreatedBy |
int |
DEFAULT 0, NOT NULL |
|
| CreatedDate |
date |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedBy |
int |
|
|
| UpdatedDate |
date |
|
Audit + Soft Delete |
| DeletedDate |
date |
|
Audit + Soft Delete |
ProtectionIntendant
| Column |
Data Type |
Constraints |
Description |
| ProtectionIntendantID |
int |
PK, IDENTITY |
|
| ProtectionIntendantFistName |
nvarchar(255) |
NOT NULL |
|
| ProtectionIntendantLastName |
nvarchar(255) |
NOT NULL |
|
| ProtectionIntendantPosition |
nvarchar(255) |
NOT NULL |
|
| ProtectionIntendantMobileNO |
nvarchar(255) |
NOT NULL |
|
| ProtectionIntendantLineID |
nvarchar(255) |
NOT NULL |
|
| DepartmentID |
int |
|
|
| Active |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedBy |
int |
DEFAULT 0, NOT NULL |
|
| CreatedDate |
date |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedBy |
int |
|
|
| UpdatedDate |
date |
|
Audit + Soft Delete |
| DeletedDate |
date |
|
Audit + Soft Delete |
ProtectionLegalProcess
| Column |
Data Type |
Constraints |
Description |
| ProtectionLegalProcessID |
int |
PK, IDENTITY |
|
| ProtectionLegalProcessText |
nvarchar(255) |
NOT NULL |
|
| ProtectionLegalProcessDetail |
text |
|
|
| Orders |
int |
DEFAULT 1, NOT NULL |
|
| Active |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedBy |
int |
DEFAULT 0, NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedBy |
int |
|
|
| UpdatedDate |
datetime |
|
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
ProtectionPurpose
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| TmWitnessStatusTimeLineId |
int |
|
|
| CriminalCaseName |
nvarchar(max) |
|
|
| TmWitnessDependId |
int |
|
|
| TmWitnessDependIdEtc |
nvarchar(255) |
|
|
| TmWitnessProtectDepartmentId |
int |
|
|
| TmWitnessProtectDepartmentIdEtc |
nvarchar(255) |
|
|
| TmWayToProtectId |
int |
|
|
| TmWayToProtectIdEtc |
nvarchar(255) |
|
|
| CaseType |
int |
|
|
| CriminalCode |
nvarchar(50) |
|
|
| OffenseId |
int |
|
|
ProtectionRelatePerson
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| PetitionProtectionId |
int |
NOT NULL |
FK → PetitionProtection.Id |
| TitleId |
int |
|
FK → Title.Id |
| FirstNameEncrypt |
nvarchar(max) |
|
ชื่อ-นามสกุล (เข้ารหัส PII) |
| LastNameEncrypt |
nvarchar(max) |
|
ชื่อ-นามสกุล (เข้ารหัส PII) |
| RelateName |
nvarchar(50) |
|
|
| BirthDate |
datetime |
|
|
| InSecureAction |
nvarchar(max) |
|
|
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| FullNameEncrypt |
nvarchar(max) |
|
|
| WitnessRelateTypeId |
int |
|
|
| TmCareerId |
int |
|
|
| TmCareerIdEtc |
nvarchar(255) |
|
|
| AddressEncrypt |
nvarchar(max) |
|
|
| AddressProvinceCode |
nvarchar(10) |
|
|
| AddressDistrictCode |
nvarchar(10) |
|
|
| AddressSubDistrictCode |
nvarchar(10) |
|
|
| AddressZipCode |
nvarchar(10) |
|
|
| AddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
ProtectionTeam
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| PetitionProtectionOrderId |
uniqueidentifier |
NOT NULL |
|
| TmProtectionTeamId |
int |
|
|
| UserId |
int |
|
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
DEFAULT 1, NOT NULL |
Audit + Soft Delete |
| UserExternalId |
int |
|
|
ProtectionTraceCase
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
NOT NULL |
|
| PetitionProtectionOrderId |
uniqueidentifier |
NOT NULL |
|
| ProtectionTraceCaseDate |
datetime |
|
|
| ProtectionTraceCaseDetail |
ntext |
|
|
| ProtectionTraceCaseTypeId |
uniqueidentifier |
NOT NULL |
|
| ProtectionTraceCaseResultId |
uniqueidentifier |
NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
|
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
ProtectionTraceCaseNotification
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
NOT NULL |
|
| PetitionProtectionOrderId |
uniqueidentifier |
NOT NULL |
|
| NotificationDate |
datetime |
|
วันที่แจ้ง |
| DiffDay |
int |
|
|
| DiffDayType |
uniqueidentifier |
|
|
| NotificationId |
uniqueidentifier |
NOT NULL |
FK → Tm_Notification.Id |
| Url |
nvarchar(max) |
|
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
|
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
ProtectionType
| Column |
Data Type |
Constraints |
Description |
| ProtectionTypeID |
int |
PK, IDENTITY |
|
| ProtectionTypeName |
nvarchar(255) |
NOT NULL |
|
| CreatedBy |
int |
DEFAULT 0, NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedBy |
int |
|
|
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
|
Audit + Soft Delete |
Province
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Code |
nvarchar(10) |
|
|
| Name |
nvarchar(50) |
|
ชื่อจังหวัด |
| AcronymName |
nvarchar(10) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| AreaId |
int |
|
|
| RegionId |
int |
|
FK → Region.Id |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
NOT NULL |
|
| Latitude |
nvarchar(150) |
|
|
| Longitude |
nvarchar(150) |
|
|
ProvincePolygon
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Code |
nvarchar(10) |
NOT NULL |
|
| features |
ntext |
NOT NULL |
|
Region
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อภูมิภาค |
| Active |
bit |
NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
Roles
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
NOT NULL |
ชื่อบทบาท |
| Permission |
text |
|
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Description |
nchar(500) |
|
คำอธิบาย |
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
RolesPermission
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| RoleId |
int |
NOT NULL |
FK → Roles.Id |
| MenuId |
int |
NOT NULL |
FK → Menu.Id |
| RoleType |
int |
NOT NULL |
|
SubDistrict
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid() |
|
| Code |
nvarchar(10) |
|
|
| Name |
nvarchar(50) |
|
ชื่อตำบล |
| NameEn |
nvarchar(50) |
|
|
| DistrictCode |
nvarchar(10) |
|
|
| ZipCode |
nvarchar(5) |
|
รหัสไปรษณีย์ |
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| Active |
bit |
NOT NULL |
|
Table_1
| Column |
Data Type |
Constraints |
Description |
| GuId |
uniqueidentifier |
|
|
| ProcessName |
nvarchar(50) |
|
|
Title
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
IDENTITY, NOT NULL |
รหัสอ้างอิง |
| Name |
nvarchar(100) |
|
คำนำหน้า (เช่น นาย, นาง, นางสาว) |
| Active |
bit |
NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| TmGenderId |
int |
|
|
Tm_BloodType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_Career
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
Global Unique Identifier |
| Name |
nvarchar(50) |
|
ชื่ออาชีพ |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
วันที่สร้าง |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
รหัสผู้สร้าง (FK → Users.Id) |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
วันที่แก้ไข |
| UpdatedId |
int |
NOT NULL |
รหัสผู้แก้ไข (FK → Users.Id) |
| DeletedDate |
datetime |
|
วันที่ลบ (soft delete) |
| Active |
bit |
NOT NULL |
สถานะใช้งาน |
| ActionPerform |
int |
|
0=ไม่ทำ, 1=แสดงอื่นๆ, 2=ยังไม่ได้ระบุ |
Tm_Damage
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| Name |
nvarchar(max) |
NOT NULL |
|
Tm_ExpenseSaveType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| Name |
nvarchar(250) |
NOT NULL |
|
| Active |
bit |
NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
Tm_ExpenseTypeUnit
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK |
|
| Name |
nvarchar(250) |
NOT NULL |
|
| Active |
bit |
DEFAULT 1, NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
Tm_Gender
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| Name |
nchar(250) |
|
|
| Active |
bit |
NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
Tm_LawyerSuggesting
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_MaritalStatus
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_Nationality
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| Name |
nvarchar(255) |
|
|
| Active |
bit |
NOT NULL |
|
| GuId |
uniqueidentifier |
NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Sequence |
int |
|
|
Tm_Notification
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_Positions
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| Name |
nchar(250) |
|
|
| Active |
bit |
NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
|
| CreatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
Tm_ProtectPlace
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_ProtectionTeam
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| Name |
nvarchar(255) |
NOT NULL |
|
| DepartmentId |
int |
|
|
| Description |
nvarchar(255) |
|
|
| Active |
bit |
|
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| CreatedDate |
datetime |
NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| UpdatedDate |
datetime |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
Tm_ProtectionTeamPerson
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| ProtectionTeamId |
int |
|
FK → Tm_ProtectionTeam.Id |
| FirstName |
nvarchar(255) |
NOT NULL |
|
| LastName |
nvarchar(255) |
NOT NULL |
|
| TitleId |
int |
|
|
| CitizenId |
nchar(15) |
NOT NULL |
|
| Email |
nvarchar(255) |
NOT NULL |
|
| LineNo |
nvarchar(255) |
|
|
| TelephoneNo |
nvarchar(20) |
|
|
| MobileNo |
nvarchar(20) |
|
|
| Active |
bit |
NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
date |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
|
Audit + Soft Delete |
| UpdatedDate |
date |
|
Audit + Soft Delete |
| DeletedDate |
date |
|
Audit + Soft Delete |
| FullName |
nvarchar(255) |
|
|
Tm_ProtectionTeamUser
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| TmProtectionTeamId |
int |
NOT NULL |
|
| UserId |
int |
NOT NULL |
FK → Users.Id |
| UserType |
int |
NOT NULL |
|
Tm_ProtectionTraceCaseResult
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
IDENTITY, NOT NULL |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_ProtectionTraceCaseType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_ProtectorType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_Race
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_ReasonToEndOfProtect
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(255) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_RelatePosition
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(100) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
NOT NULL |
|
| PetitionType |
int |
NOT NULL |
|
Tm_Religion
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
Tm_ResolutionOnAgenda
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_SendFile
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(100) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_SendPlace
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
NOT NULL |
|
Tm_ThreeMonths
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| Name |
nvarchar(200) |
NOT NULL |
|
| Remark |
nvarchar(max) |
|
|
Tm_WaitToApproveByDirector
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_WaitToApproveByDirectorDeputyGeneral
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_WaitToApproveByDirectorGeneral
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_WayToProtect
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_WitnessDepend
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_WitnessProtectDepartment
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_WitnessStatus
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
Tm_WitnessStatusTimeLine
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
|
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Name |
nvarchar(50) |
|
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
|
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
|
| UpdatedId |
int |
NOT NULL |
|
| DeletedDate |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| ActionPerform |
int |
|
|
UserRoles
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| RoleId |
int |
NOT NULL |
FK → Roles.Id |
| UserId |
int |
NOT NULL |
FK → Users.Id |
Users
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| FirstName |
nvarchar(255) |
NOT NULL |
ชื่อ |
| LastName |
nvarchar(255) |
NOT NULL |
นามสกุล |
| PositionId |
int |
|
FK → Tm_Positions.Id |
| UserName |
nvarchar(255) |
NOT NULL |
ชื่อผู้ใช้ |
| Password |
nvarchar(255) |
NOT NULL |
|
| Email |
nvarchar(255) |
NOT NULL |
อีเมล |
| LineIdNo |
nvarchar(255) |
|
|
| TelephoneNo |
nvarchar(20) |
|
|
| MobileNo |
nvarchar(20) |
|
|
| LastLogin |
datetime |
|
|
| Active |
bit |
NOT NULL |
|
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| TokenKey |
nvarchar(1500) |
|
|
| RememberMe |
bit |
|
|
| TokenExpire |
datetime |
DEFAULT dateadd(day,(7),getdate()) |
|
| MACAddress |
nvarchar(100) |
|
|
| TitleId |
int |
NOT NULL |
|
| DepartmentId |
int |
|
FK → Department.Id |
| CitizenId |
nchar(15) |
NOT NULL |
เลขบัตรประชาชน |
| UserType |
int |
NOT NULL |
|
| FullName |
nvarchar(255) |
|
|
Users_External
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| FirstName |
nvarchar(255) |
NOT NULL |
ชื่อ-นามสกุล |
| LastName |
nvarchar(255) |
NOT NULL |
ชื่อ-นามสกุล |
| PositionId |
int |
|
|
| Email |
nvarchar(255) |
|
อีเมล |
| LineIdNo |
nvarchar(255) |
|
|
| TelephoneNo |
nvarchar(20) |
|
|
| MobileNo |
nvarchar(20) |
|
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| TitleId |
int |
NOT NULL |
|
| DepartmentId |
int |
|
|
| CitizenId |
nvarchar(15) |
|
เลขบัตรประชาชน |
| UserType |
int |
NOT NULL |
|
| FullName |
nvarchar(255) |
|
|
Users_Honorable
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| TitleId |
int |
NOT NULL |
FK → Title.Id |
| FirstName |
varchar(255) |
NOT NULL |
ชื่อ-นามสกุล |
| LastName |
varchar(255) |
NOT NULL |
ชื่อ-นามสกุล |
| FullName |
varchar(255) |
|
|
| CitizenId |
char(15) |
NOT NULL |
เลขบัตรประชาชน (Filtered Unique Index) |
| Email |
varchar(255) |
NOT NULL |
|
| LineIdNo |
varchar(255) |
|
|
| TelephoneNo |
varchar(20) |
|
|
| MobileNo |
varchar(20) |
|
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
Witness
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| TitleId |
int |
|
FK → Title.Id |
| NameEncrypt |
nvarchar(max) |
|
|
| LastNameEncrypt |
nvarchar(max) |
|
นามสกุล (เข้ารหัส PII) |
| BirthDate |
datetime |
|
|
| ReligionId |
int |
|
FK → Tm_Religion.Id |
| RaceId |
int |
|
FK → Tm_Race.Id |
| NationalityId |
int |
|
FK → Tm_Nationality.Id |
| BloodTypeId |
int |
|
FK → Tm_BloodType.Id |
| CongenitalDisease |
nvarchar(255) |
|
|
| HistoryOfAllergy |
nvarchar(255) |
|
|
| FatherTitleId |
int |
|
|
| FatherNameEncrypt |
nvarchar(max) |
|
|
| FatherLastNameEncrypt |
nvarchar(max) |
|
|
| FatherBirthDate |
datetime |
|
|
| MotherTitleId |
int |
|
|
| MotherNameEncrypt |
nvarchar(max) |
|
|
| MotherLastNameEncrypt |
nvarchar(max) |
|
|
| MotherBirthDate |
datetime |
|
|
| AddressEncrypt |
nvarchar(max) |
|
|
| AddressProvinceCode |
nvarchar(10) |
|
|
| AddressDistrictCode |
nvarchar(10) |
|
|
| AddressSubDistrictCode |
nvarchar(10) |
|
|
| AddressZipCode |
nvarchar(10) |
|
|
| AddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| WorkAddressEncrypt |
nvarchar(max) |
|
|
| WorkAddressProvinceCode |
nvarchar(10) |
|
|
| WorkAddressDistrictCode |
nvarchar(10) |
|
|
| WorkAddressSubDistrictCode |
nvarchar(10) |
|
|
| WorkAddressZipCode |
nvarchar(10) |
|
|
| WorkAddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| CitizenCardNumberEncrypt |
nvarchar(max) |
|
|
| PassportNumberEncrypt |
nvarchar(max) |
|
|
| OfficerCardNumberEncrypt |
nvarchar(max) |
|
|
| SubjectOfficer |
nvarchar(50) |
|
|
| IssueDate |
datetime |
|
|
| ExpireDate |
datetime |
|
|
| OtherTitleId |
int |
|
|
| OtherNameEncrypt |
nvarchar(max) |
|
|
| OtherLastNameEncrypt |
nvarchar(max) |
|
|
| OtherBirthDate |
datetime |
|
|
| OtherMobilePhoneNumber |
nvarchar(50) |
|
|
| OtherAddressEncrypt |
nvarchar(max) |
|
|
| OtherAddressProvinceCode |
nvarchar(10) |
|
|
| OtherAddressDistrictCode |
nvarchar(10) |
|
|
| OtherAddressSubDistrictCode |
nvarchar(10) |
|
|
| OtherAddressZipCode |
nvarchar(10) |
|
|
| OtherAddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| OtherWorkAddressEncrypt |
nvarchar(max) |
|
|
| OtherWorkAddressProvinceCode |
nvarchar(10) |
|
|
| OtherWorkAddressDistrictCode |
nvarchar(10) |
|
|
| OtherWorkAddressSubDistrictCode |
nvarchar(10) |
|
|
| OtherWorkAddressZipCode |
nvarchar(10) |
|
|
| OtherWorkAddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| TmCareerId |
int |
|
|
| TmCareerIdEtc |
nvarchar(255) |
|
|
| TmMaritalStatusId |
int |
|
|
| TmMaritalStatusIdEtc |
int |
|
|
| OriginAddressEncrypt |
nvarchar(max) |
|
|
| OriginAddressProvinceCode |
nvarchar(10) |
|
|
| OriginAddressDistrictCode |
nvarchar(10) |
|
|
| OriginAddressSubDistrictCode |
nvarchar(10) |
|
|
| OriginAddressZipCode |
nvarchar(10) |
|
|
| OriginAddressPhoneNumberEncrypt |
nvarchar(max) |
|
|
| IsAddressSameOriginAddress |
bit |
NOT NULL |
|
WitnessOther
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| GuId |
uniqueidentifier |
DEFAULT newid(), NOT NULL |
|
| Active |
bit |
NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
NOT NULL |
Audit + Soft Delete |
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |
| UpdatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| GuIdFile |
uniqueidentifier |
NOT NULL |
|
| GuIdPetitionProtection |
uniqueidentifier |
NOT NULL |
|
| WitnessId |
int |
|
|
| ScWitnessFullNameEncrypt |
nvarchar(max) |
|
|
WitnessRelateType
| Column |
Data Type |
Constraints |
Description |
| Id |
int |
PK, IDENTITY |
รหัสอ้างอิง |
| Name |
nvarchar(255) |
|
ชื่อประเภทความสัมพันธ์ |
| Description |
nvarchar(1500) |
|
|
| Active |
bit |
DEFAULT 1, NOT NULL |
|
| CreatedDate |
datetime |
DEFAULT getdate(), NOT NULL |
Audit + Soft Delete |
| CreatedId |
int |
DEFAULT 0, NOT NULL |
Audit + Soft Delete |
| UpdatedDate |
datetime |
NOT NULL |
Audit + Soft Delete |
| UpdatedId |
int |
NOT NULL |
Audit + Soft Delete |
| DeletedDate |
datetime |
|
Audit + Soft Delete |