+2
-1
@@ -27,7 +27,8 @@ go.work.sum
|
||||
# env file
|
||||
.env
|
||||
config.yml
|
||||
cmd/migration/atlas.hcl
|
||||
|
||||
# Editor/IDE
|
||||
# .idea/
|
||||
# .vscode/
|
||||
.vscode/*
|
||||
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Package main API",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/main-api"
|
||||
},
|
||||
{
|
||||
"name": "Launch Package migratioon",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/cmd/migration"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,6 +15,12 @@ dbCfg:
|
||||
maxIdleConns: 5
|
||||
maxIdleTime: 100
|
||||
|
||||
ssDbCfg:
|
||||
dsn:
|
||||
maxOpenConns: 5
|
||||
maxIdleConns: 5
|
||||
maxIdleTime: 100
|
||||
|
||||
loggerCfg:
|
||||
hideTime:
|
||||
hideLevel:
|
||||
@@ -41,7 +47,12 @@ corsCfg:
|
||||
allowedMethod:
|
||||
|
||||
satuSehatCfg:
|
||||
host: localhsot:8200
|
||||
host: localhost:8200
|
||||
|
||||
bpjsCfg:
|
||||
host: localhsot:8200
|
||||
host: localhost:8200
|
||||
|
||||
corsCfg:
|
||||
allowedOrigins:
|
||||
- http://example.com
|
||||
allowedMethod:
|
||||
@@ -0,0 +1,22 @@
|
||||
data "external_schema" "gorm" {
|
||||
program = [
|
||||
"go",
|
||||
"run",
|
||||
"-mod=mod",
|
||||
".",
|
||||
]
|
||||
}
|
||||
|
||||
env "gorm" {
|
||||
src = data.external_schema.gorm.url
|
||||
dev = "" // dsn db to check the diff
|
||||
migration {
|
||||
dir = "file://migrations"
|
||||
}
|
||||
url = "" // dsn db to apply
|
||||
format {
|
||||
migrate {
|
||||
diff = "{{ sql . \" \" }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
appCfg:
|
||||
fullName: BPJS Bridge
|
||||
codeName: simrs-vx
|
||||
version: 0.1.0
|
||||
env: development
|
||||
lang: en
|
||||
|
||||
httpCfg:
|
||||
host:
|
||||
port:
|
||||
|
||||
dbCfg:
|
||||
dsn:
|
||||
maxOpenConns: 5
|
||||
maxIdleConns: 5
|
||||
maxIdleTime: 100
|
||||
|
||||
loggerCfg:
|
||||
hideTime:
|
||||
hideLevel:
|
||||
|
||||
msCfg:
|
||||
dsn:
|
||||
|
||||
langCfg:
|
||||
active:
|
||||
path:
|
||||
fileName:
|
||||
|
||||
minioCfg:
|
||||
endpoint:
|
||||
region:
|
||||
accessKey:
|
||||
secretKey:
|
||||
useSsl:
|
||||
bucketName:
|
||||
- patient
|
||||
|
||||
corsCfg:
|
||||
allowedOrigin:
|
||||
allowedMethod:
|
||||
|
||||
satuSehatCfg:
|
||||
host: localhsot:8200
|
||||
|
||||
bpjsCfg:
|
||||
host: localhsot:8200
|
||||
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
m "simrs-vx/internal/interface/migration"
|
||||
)
|
||||
|
||||
func main() {
|
||||
m.Migrate()
|
||||
}
|
||||
@@ -0,0 +1,524 @@
|
||||
-- Create "DiagnoseSrc" table
|
||||
CREATE TABLE "public"."DiagnoseSrc" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(2048) NULL,
|
||||
"IndName" character varying(2048) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_DiagnoseSrc_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "Counter" table
|
||||
CREATE TABLE "public"."Counter" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(30) NULL,
|
||||
"Number" smallint NULL,
|
||||
"Parent_Id" integer NULL,
|
||||
"Type_Code" text NULL,
|
||||
"Queue_Code" character varying(5) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Counter_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "McuSrcCategory" table
|
||||
CREATE TABLE "public"."McuSrcCategory" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(20) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"Scope_Code" character varying(10) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_McuSrcCategory_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "McuSrc" table
|
||||
CREATE TABLE "public"."McuSrc" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(20) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"CheckupCategory_Code" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_McuSrc_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "Uom" table
|
||||
CREATE TABLE "public"."Uom" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Uom_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "PharmacyCompany" table
|
||||
CREATE TABLE "public"."PharmacyCompany" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(20) NULL,
|
||||
"Name" character varying(100) NULL,
|
||||
"Regency_Code" character varying(4) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_PharmacyCompany_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "User" table
|
||||
CREATE TABLE "public"."User" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Name" character varying(25) NOT NULL,
|
||||
"Password" character varying(255) NOT NULL,
|
||||
"Status_Code" character varying(10) NOT NULL,
|
||||
"FailedLoginCount" smallint NULL,
|
||||
"LoginAttemptCount" bigint NULL,
|
||||
"LastSuccessLogin" timestamptz NULL,
|
||||
"LastAllowdLogin" timestamptz NULL,
|
||||
PRIMARY KEY ("Id")
|
||||
);
|
||||
-- Create "Item" table
|
||||
CREATE TABLE "public"."Item" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(50) NULL,
|
||||
"Name" character varying(100) NULL,
|
||||
"ItemGroup_Code" character varying(10) NULL,
|
||||
"Uom_Code" character varying(10) NULL,
|
||||
"Infra_Id" integer NULL,
|
||||
"Stock" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Item_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Item_Uom" FOREIGN KEY ("Uom_Code") REFERENCES "public"."Uom" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Infra" table
|
||||
CREATE TABLE "public"."Infra" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"InfraGroup_Code" character varying(10) NULL,
|
||||
"Parent_Id" smallint NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Infra_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Infra_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Device" table
|
||||
CREATE TABLE "public"."Device" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"Uom_Code" character varying(10) NULL,
|
||||
"Infra_Id" integer NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Device_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Device_Infra" FOREIGN KEY ("Infra_Id") REFERENCES "public"."Infra" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Device_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Device_Uom" FOREIGN KEY ("Uom_Code") REFERENCES "public"."Uom" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Province" table
|
||||
CREATE TABLE "public"."Province" (
|
||||
"Id" smallserial NOT NULL,
|
||||
"Code" character varying(2) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Province_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "Regency" table
|
||||
CREATE TABLE "public"."Regency" (
|
||||
"Id" serial NOT NULL,
|
||||
"Province_Code" character varying(2) NULL,
|
||||
"Code" character varying(4) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Regency_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Province_Regencies" FOREIGN KEY ("Province_Code") REFERENCES "public"."Province" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "District" table
|
||||
CREATE TABLE "public"."District" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"Regency_Code" character varying(4) NULL,
|
||||
"Code" character varying(6) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_District_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Regency_Districts" FOREIGN KEY ("Regency_Code") REFERENCES "public"."Regency" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Division" table
|
||||
CREATE TABLE "public"."Division" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"Parent_Id" smallint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Division_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "DivisionPosition" table
|
||||
CREATE TABLE "public"."DivisionPosition" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Division_Id" integer NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_DivisionPosition_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_DivisionPosition_Division" FOREIGN KEY ("Division_Id") REFERENCES "public"."Division" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Employee" table
|
||||
CREATE TABLE "public"."Employee" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"User_Id" bigint NULL,
|
||||
"Person_Id" bigint NULL,
|
||||
"Position_Code" character varying(20) NOT NULL,
|
||||
"Division_Code" character varying(10) NULL,
|
||||
"Number" character varying(20) NULL,
|
||||
"Status_Code" character varying(10) NOT NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Employee_Division" FOREIGN KEY ("Division_Code") REFERENCES "public"."Division" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Installation" table
|
||||
CREATE TABLE "public"."Installation" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"EncounterClass_Code" character varying(10) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Installation_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "Unit" table
|
||||
CREATE TABLE "public"."Unit" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Installation_Id" integer NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Unit_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Unit_Installation" FOREIGN KEY ("Installation_Id") REFERENCES "public"."Installation" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Doctor" table
|
||||
CREATE TABLE "public"."Doctor" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Employee_Id" bigint NULL,
|
||||
"IHS_Number" character varying(20) NULL,
|
||||
"SIP_Number" character varying(20) NULL,
|
||||
"Unit_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Doctor_Employee" FOREIGN KEY ("Employee_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Doctor_Unit" FOREIGN KEY ("Unit_Id") REFERENCES "public"."Unit" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "DoctorFee" table
|
||||
CREATE TABLE "public"."DoctorFee" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Doctor_Id" bigint NULL,
|
||||
"FeeType_Code" character varying(11) NULL,
|
||||
"Price" numeric NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_DoctorFee_Doctor" FOREIGN KEY ("Doctor_Id") REFERENCES "public"."Doctor" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_DoctorFee_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "InsuranceCompany" table
|
||||
CREATE TABLE "public"."InsuranceCompany" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(20) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"Regency_Code" character varying(4) NULL,
|
||||
"Address" character varying(100) NULL,
|
||||
"PhoneNumber" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_InsuranceCompany_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_InsuranceCompany_Regency" FOREIGN KEY ("Regency_Code") REFERENCES "public"."Regency" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "ItemPrice" table
|
||||
CREATE TABLE "public"."ItemPrice" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
"Price" numeric NULL,
|
||||
"InsuranceCompany_Code" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_ItemPrice_InsuranceCompany" FOREIGN KEY ("InsuranceCompany_Code") REFERENCES "public"."InsuranceCompany" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_ItemPrice_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Material" table
|
||||
CREATE TABLE "public"."Material" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"Uom_Code" character varying(10) NULL,
|
||||
"Infra_Id" integer NULL,
|
||||
"Stock" bigint NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Material_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Material_Infra" FOREIGN KEY ("Infra_Id") REFERENCES "public"."Infra" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Material_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Material_Uom" FOREIGN KEY ("Uom_Code") REFERENCES "public"."Uom" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "MedicalActionSrc" table
|
||||
CREATE TABLE "public"."MedicalActionSrc" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(20) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_MedicalActionSrc_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_MedicalActionSrc_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "ProcedureSrc" table
|
||||
CREATE TABLE "public"."ProcedureSrc" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(2048) NULL,
|
||||
"IndName" character varying(2048) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_ProcedureSrc_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "MedicalActionSrcItem" table
|
||||
CREATE TABLE "public"."MedicalActionSrcItem" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"MedicalActionSrc_Id" bigint NULL,
|
||||
"ProcedureSrc_Id" bigint NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_MedicalActionSrcItem_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_MedicalActionSrcItem_MedicalActionSrc" FOREIGN KEY ("MedicalActionSrc_Id") REFERENCES "public"."MedicalActionSrc" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_MedicalActionSrcItem_ProcedureSrc" FOREIGN KEY ("ProcedureSrc_Id") REFERENCES "public"."ProcedureSrc" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "MedicineGroup" table
|
||||
CREATE TABLE "public"."MedicineGroup" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(50) NULL,
|
||||
"Name" character varying(100) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_MedicineGroup_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "MedicineMethod" table
|
||||
CREATE TABLE "public"."MedicineMethod" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(50) NULL,
|
||||
"Name" character varying(100) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_MedicineMethod_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "Medicine" table
|
||||
CREATE TABLE "public"."Medicine" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
"MedicineGroup_Code" character varying(10) NULL,
|
||||
"MedicineMethod_Code" character varying(10) NULL,
|
||||
"Uom_Code" character varying(10) NULL,
|
||||
"Dose" smallint NULL,
|
||||
"Infra_Id" integer NULL,
|
||||
"Stock" bigint NULL,
|
||||
"Item_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Medicine_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_Medicine_Infra" FOREIGN KEY ("Infra_Id") REFERENCES "public"."Infra" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Medicine_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Medicine_MedicineGroup" FOREIGN KEY ("MedicineGroup_Code") REFERENCES "public"."MedicineGroup" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Medicine_MedicineMethod" FOREIGN KEY ("MedicineMethod_Code") REFERENCES "public"."MedicineMethod" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Medicine_Uom" FOREIGN KEY ("Uom_Code") REFERENCES "public"."Uom" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "MedicineMix" table
|
||||
CREATE TABLE "public"."MedicineMix" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id")
|
||||
);
|
||||
-- Create "MedicineMixItem" table
|
||||
CREATE TABLE "public"."MedicineMixItem" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"MedicineMix_Id" bigint NULL,
|
||||
"Medicine_Id" bigint NULL,
|
||||
"Dose" smallint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_MedicineMixItem_Medicine" FOREIGN KEY ("Medicine_Id") REFERENCES "public"."Medicine" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_MedicineMixItem_MedicineMix" FOREIGN KEY ("MedicineMix_Id") REFERENCES "public"."MedicineMix" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Nurse" table
|
||||
CREATE TABLE "public"."Nurse" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Employee_Id" bigint NULL,
|
||||
"IHS_Number" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Nurse_Employee" FOREIGN KEY ("Employee_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Nutritionist" table
|
||||
CREATE TABLE "public"."Nutritionist" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Employee_Id" bigint NULL,
|
||||
"IHS_Number" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Nutritionist_Employee" FOREIGN KEY ("Employee_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Ethnic" table
|
||||
CREATE TABLE "public"."Ethnic" (
|
||||
"Id" serial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Code" character varying(20) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Ethnic_Code" UNIQUE ("Code")
|
||||
);
|
||||
-- Create "Person" table
|
||||
CREATE TABLE "public"."Person" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Name" character varying(150) NOT NULL,
|
||||
"BirthDate" timestamptz NULL,
|
||||
"BirthRegency_Code" character varying(4) NULL,
|
||||
"Gender_Code" character varying(10) NULL,
|
||||
"ResidentIdentityNumber" character varying(16) NULL,
|
||||
"Religion_Code" character varying(10) NULL,
|
||||
"Education_Code" character varying(10) NULL,
|
||||
"Ocupation_Code" character varying(15) NULL,
|
||||
"Ocupation_Name" character varying(50) NULL,
|
||||
"Ethnic_Code" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Person_Ethnic" FOREIGN KEY ("Ethnic_Code") REFERENCES "public"."Ethnic" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "PersonAddress" table
|
||||
CREATE TABLE "public"."PersonAddress" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Person_Id" bigint NULL,
|
||||
"Address" character varying(150) NULL,
|
||||
"Rt" character varying(2) NULL,
|
||||
"Rw" character varying(2) NULL,
|
||||
"Village_Code" character varying(10) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Person_Addresses" FOREIGN KEY ("Person_Id") REFERENCES "public"."Person" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "PersonContact" table
|
||||
CREATE TABLE "public"."PersonContact" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Person_Id" bigint NULL,
|
||||
"Type_Code" character varying(15) NULL,
|
||||
"Value" character varying(100) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Person_Contacts" FOREIGN KEY ("Person_Id") REFERENCES "public"."Person" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Pharmacist" table
|
||||
CREATE TABLE "public"."Pharmacist" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Employee_Id" bigint NULL,
|
||||
"IHS_Number" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Pharmacist_Employee" FOREIGN KEY ("Employee_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "PracticeSchedule" table
|
||||
CREATE TABLE "public"."PracticeSchedule" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Doctor_Id" bigint NULL,
|
||||
"Unit_Code" character varying(10) NULL,
|
||||
"Day_Code" smallint NULL,
|
||||
"StartTime" character varying(5) NULL,
|
||||
"EndTime" character varying(5) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_PracticeSchedule_Doctor" FOREIGN KEY ("Doctor_Id") REFERENCES "public"."Doctor" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_PracticeSchedule_Unit" FOREIGN KEY ("Unit_Code") REFERENCES "public"."Unit" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Create "Village" table
|
||||
CREATE TABLE "public"."Village" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"District_Code" character varying(6) NULL,
|
||||
"Code" character varying(10) NULL,
|
||||
"Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_Village_Code" UNIQUE ("Code"),
|
||||
CONSTRAINT "fk_District_Villages" FOREIGN KEY ("District_Code") REFERENCES "public"."District" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
-- Modify "Infra" table
|
||||
ALTER TABLE "public"."Infra" ALTER COLUMN "Parent_Id" TYPE integer;
|
||||
-- Modify "User" table
|
||||
ALTER TABLE "public"."User" ADD CONSTRAINT "uni_User_Name" UNIQUE ("Name");
|
||||
-- Modify "Employee" table
|
||||
ALTER TABLE "public"."Employee" ADD CONSTRAINT "fk_Employee_Person" FOREIGN KEY ("Person_Id") REFERENCES "public"."Person" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_Employee_User" FOREIGN KEY ("User_Id") REFERENCES "public"."User" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Modify "McuSrc" table
|
||||
ALTER TABLE "public"."McuSrc" ADD CONSTRAINT "fk_McuSrc_CheckupCategory" FOREIGN KEY ("CheckupCategory_Code") REFERENCES "public"."McuSrcCategory" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Modify "Person" table
|
||||
ALTER TABLE "public"."Person" ADD COLUMN "FrontTitle" character varying(50) NULL, ADD COLUMN "EndTitle" character varying(50) NULL;
|
||||
@@ -0,0 +1,5 @@
|
||||
h1:vQwjJ2jG5TRFv8oZyhxcynOFS+H0vyKY/XWsXJyhpuo=
|
||||
20250829081952.sql h1:YMsYq3uPsx70EjWSGfYnVRR5GV0q1fRGIszYZAWzXNo=
|
||||
20250901073356.sql h1:jjd5TLs+Pyi0u3SrOM+aNTbHxSJboXgcOz/L4bkYx+c=
|
||||
20250901080035.sql h1:LWa3X0NWjalVcxNbk5HaHj1Oqu60/AQabi0jBmCeQBI=
|
||||
20250901105703.sql h1:45mFfTFkLv+1oQXfqNxtCBGXTyzWuqq759I3u1SVxRo=
|
||||
@@ -1,32 +1,51 @@
|
||||
module simrs-vx
|
||||
|
||||
go 1.23.0
|
||||
go 1.24
|
||||
|
||||
toolchain go1.23.11
|
||||
toolchain go1.24.6
|
||||
|
||||
require (
|
||||
github.com/karincake/apem v0.0.16-e
|
||||
ariga.io/atlas-provider-gorm v0.5.6
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/karincake/apem v0.0.16-h
|
||||
github.com/karincake/dodol v0.0.1
|
||||
gorm.io/gorm v1.25.10
|
||||
github.com/karincake/getuk v0.1.0
|
||||
github.com/karincake/hongkue v0.0.4
|
||||
github.com/karincake/lepet v0.0.1
|
||||
github.com/karincake/risoles v0.0.3
|
||||
github.com/karincake/semprit v0.0.3
|
||||
github.com/rs/zerolog v1.33.0
|
||||
golang.org/x/crypto v0.41.0
|
||||
gorm.io/driver/postgres v1.5.11
|
||||
gorm.io/gorm v1.25.12
|
||||
)
|
||||
|
||||
require (
|
||||
ariga.io/atlas v0.36.2-0.20250806044935-5bb51a0a956e // indirect
|
||||
github.com/go-redis/redis v6.15.9+incompatible // indirect
|
||||
github.com/go-sql-driver/mysql v1.7.0 // indirect
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
|
||||
github.com/golang-sql/sqlexp v0.1.0 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/pgx/v5 v5.4.3 // indirect
|
||||
github.com/jackc/pgx/v5 v5.5.5 // indirect
|
||||
github.com/jackc/puddle/v2 v2.2.1 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/karincake/serabi v0.0.14 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/mattn/go-sqlite3 v1.14.28 // indirect
|
||||
github.com/microsoft/go-mssqldb v1.7.2 // indirect
|
||||
github.com/nxadm/tail v1.4.11 // indirect
|
||||
github.com/rs/zerolog v1.33.0 // indirect
|
||||
golang.org/x/crypto v0.40.0 // indirect
|
||||
golang.org/x/net v0.42.0 // indirect
|
||||
golang.org/x/sys v0.34.0 // indirect
|
||||
golang.org/x/text v0.27.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
|
||||
golang.org/x/sync v0.16.0 // indirect
|
||||
golang.org/x/sys v0.35.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gorm.io/driver/postgres v1.5.7 // indirect
|
||||
gorm.io/driver/mysql v1.5.7 // indirect
|
||||
gorm.io/driver/sqlite v1.5.7 // indirect
|
||||
gorm.io/driver/sqlserver v1.5.4 // indirect
|
||||
)
|
||||
|
||||
@@ -1,44 +1,116 @@
|
||||
ariga.io/atlas v0.36.2-0.20250806044935-5bb51a0a956e h1:7upp27oOT/fmM5Dz3z9k8cmYwKJ2NAzuTqfT/rEP+50=
|
||||
ariga.io/atlas v0.36.2-0.20250806044935-5bb51a0a956e/go.mod h1:Ex5l1xHsnWQUc3wYnrJ9gD7RUEzG76P7ZRQp8wNr0wc=
|
||||
ariga.io/atlas-provider-gorm v0.5.6 h1:poMRZgIRvx/qIFtartefgOjCfgNIPBCdrVfkb5pIBQc=
|
||||
ariga.io/atlas-provider-gorm v0.5.6/go.mod h1:9UmIoNjSAB6CHOrshEmR6sXUmqpLpIGWffBQigjQYDs=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 h1:lGlwhPtrX6EVml1hO0ivjkUxsSyl4dsiw9qcA1k/3IQ=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1/go.mod h1:RKUqNu35KJYcVG/fqTRqmuXJZYNhYkBrnC/hX7yGbTA=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 h1:6oNBlSdi1QqM1PNW7FPA6xOGA5UNsXnkaYZz9vdPGhA=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1 h1:MyVTgWR8qd/Jw1Le0NZebGBUCLbtak3bJ3z1OlqZBpw=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1/go.mod h1:GpPjLhVR9dnUoJMyHWSPy71xY9/lcmpzIPZXmF0FCVY=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 h1:D3occbWoio4EBLkbkevetNMAVX197GkzbUMtqjGWn80=
|
||||
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h1:bTSOgj05NGRuHHhQwAdPnYr9TOdNmKlZTgGLL6nyAdI=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 h1:DzHpqpoJVaCgOUdVHxE8QB52S6NiVdDQvGlny1qvPqA=
|
||||
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko=
|
||||
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
|
||||
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
|
||||
github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
|
||||
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
|
||||
github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw=
|
||||
github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
|
||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=
|
||||
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
|
||||
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
|
||||
github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||
github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY=
|
||||
github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA=
|
||||
github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw=
|
||||
github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
|
||||
github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
|
||||
github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||
github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
|
||||
github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM=
|
||||
github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo=
|
||||
github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg=
|
||||
github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
|
||||
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
|
||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||
github.com/karincake/apem v0.0.16-e h1:KGeQYmgNw8luidSWkZyGcMbW1PP3KMRCHMTEHQ7twU8=
|
||||
github.com/karincake/apem v0.0.16-e/go.mod h1:cQP2sJfDrLRIiwWoaLWw/z8uAya+DWu/FpmYeinMQXM=
|
||||
github.com/karincake/apem v0.0.16-h h1:rfO444oDG4cWFf0PjUshA+0U8KI/u067Va273WeJhpU=
|
||||
github.com/karincake/apem v0.0.16-h/go.mod h1:cQP2sJfDrLRIiwWoaLWw/z8uAya+DWu/FpmYeinMQXM=
|
||||
github.com/karincake/dodol v0.0.1 h1:jUXmJh1r0Ei4fmHPZ6IUkoplW/V9d27L63JEl6zudL0=
|
||||
github.com/karincake/dodol v0.0.1/go.mod h1:2f1NcvkvY0J3GMUkwILNDYVvRUpz0W3lpPp/Ha/Ld24=
|
||||
github.com/karincake/getuk v0.1.0 h1:jcIsASrr0UDE528GN7Ua6n9UFyRgUypsWh8Or8wzCO0=
|
||||
github.com/karincake/getuk v0.1.0/go.mod h1:NVnvxSGAkQ/xuq99FzWACvY5efyKPLFla1cKB8czm7c=
|
||||
github.com/karincake/hongkue v0.0.4 h1:oWthq6cDg5DvDm1Z3e7mCLOATQf+oAdtHxN9OPnCfA8=
|
||||
github.com/karincake/hongkue v0.0.4/go.mod h1:YVi5Lyh3DE+GRHx2OSODOr7FwvLi8U4idvcPHO7yeag=
|
||||
github.com/karincake/lepet v0.0.1 h1:eq/cwn5BBg0jWZ1c/MmvhFIBma0zBpVs2LwkfDOncy4=
|
||||
github.com/karincake/lepet v0.0.1/go.mod h1:U84w7olXO3BPJw2Hu6MBonFmJmPKaFjtyAj1HTu3z1A=
|
||||
github.com/karincake/risoles v0.0.3 h1:7VBShf2yC6NqD0PotQcb0i8Xe6mJeTRrHnE0qzKf7NU=
|
||||
github.com/karincake/risoles v0.0.3/go.mod h1:u4YS+rPp92ODTbGC4RUx4DxKoThnmPjBl1CNdnmKD/c=
|
||||
github.com/karincake/semprit v0.0.3 h1:znleGRu73xrHk6a70+jRQgVh9VF3TAhttQz6vfgNdyM=
|
||||
github.com/karincake/semprit v0.0.3/go.mod h1:nLtNmWlHkxMKG0IMzqnnfkn1L/RVYGXVW3LchfYQMu8=
|
||||
github.com/karincake/serabi v0.0.14 h1:yK3nBLRXdoUNSUDIfbZqIQxnZ6U6Ij5QEO8d5QzZzsw=
|
||||
github.com/karincake/serabi v0.0.14/go.mod h1:GcnPBWb+UotDxvb/a2CKwourCEyVIL4P9+YxVmZ5zgk=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA=
|
||||
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A=
|
||||
github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/microsoft/go-mssqldb v1.7.2 h1:CHkFJiObW7ItKTJfHo1QX7QBBD1iV+mn1eOyRP3b/PA=
|
||||
github.com/microsoft/go-mssqldb v1.7.2/go.mod h1:kOvZKUdrhhFQmxLZqbwUV0rHkNkZpthMITIb2Ko1IoA=
|
||||
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
|
||||
github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
|
||||
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
|
||||
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
|
||||
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
|
||||
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
@@ -48,31 +120,121 @@ github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
|
||||
github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
|
||||
golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
|
||||
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
|
||||
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY=
|
||||
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
|
||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
|
||||
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
|
||||
golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
|
||||
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
||||
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
|
||||
golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
|
||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gorm.io/driver/postgres v1.5.7 h1:8ptbNJTDbEmhdr62uReG5BGkdQyeasu/FZHxI0IMGnM=
|
||||
gorm.io/driver/postgres v1.5.7/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA=
|
||||
gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s=
|
||||
gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo=
|
||||
gorm.io/driver/mysql v1.5.7/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM=
|
||||
gorm.io/driver/postgres v1.5.11 h1:ubBVAfbKEUld/twyKZ0IYn9rSQh448EdelLYk9Mv314=
|
||||
gorm.io/driver/postgres v1.5.11/go.mod h1:DX3GReXH+3FPWGrrgffdvCk3DQ1dwDPdmbenSkweRGI=
|
||||
gorm.io/driver/sqlite v1.5.7 h1:8NvsrhP0ifM7LX9G4zPB97NwovUakUxc+2V2uuf3Z1I=
|
||||
gorm.io/driver/sqlite v1.5.7/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDah4=
|
||||
gorm.io/driver/sqlserver v1.5.4 h1:xA+Y1KDNspv79q43bPyjDMUgHoYHLhXYmdFcYPobg8g=
|
||||
gorm.io/driver/sqlserver v1.5.4/go.mod h1:+frZ/qYmuna11zHPlh5oc2O6ZA/lS88Keb0XSH1Zh/g=
|
||||
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
|
||||
gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package single
|
||||
|
||||
type Createdto struct {
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
@@ -9,18 +9,29 @@ type Createdto struct {
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type Updatedto struct {
|
||||
Id uint `json:"id"`
|
||||
Createdto
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type Deletedto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package core
|
||||
|
||||
import "gorm.io/gorm"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Base struct {
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
DeteledAt gorm.DeletedAt `json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt" gorm:"column:CreatedAt;type:timestamptz"`
|
||||
UpdatedAt time.Time `json:"updatedAt" gorm:"column:UpdatedAt;type:timestamptz"`
|
||||
DeletedAt gorm.DeletedAt `json:"deletedAt,omitempty" gorm:"column:DeletedAt"`
|
||||
}
|
||||
|
||||
//
|
||||
type Main struct {
|
||||
Id uint `json:"id" gorm:"primaryKey"` // depends on the system architecture
|
||||
Base
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package counter
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Number uint8 `json:"number"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Queue_Code string `json:"queue_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Number uint8 `json:"number"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Queue_Code string `json:"queue_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Number uint8 `json:"number"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Queue_Code string `json:"queue_code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Number uint8 `json:"number"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Queue_Code string `json:"queue_code"`
|
||||
}
|
||||
|
||||
func (d Counter) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Number: d.Number,
|
||||
Parent_Id: d.Parent_Id,
|
||||
Type_Code: d.Type_Code,
|
||||
Queue_Code: d.Queue_Code,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Counter) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package counter
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type Counter struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:30"`
|
||||
Number uint8 `json:"number" gorm:"size:10"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Type_Code string `json:"type_code"`
|
||||
Queue_Code string `json:"queue_code" gorm:"size:5"`
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package device
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ein "simrs-vx/internal/domain/main-entities/infra"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Uom_Code string `json:"uom_code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Uom_Code string `json:"uom_code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Uom_Code string `json:"uom_code"`
|
||||
Uom *eu.Uom `json:"uom,omitempty"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ein.Infra `json:"infra,omitempty"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d Device) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Uom_Code: d.Uom_Code,
|
||||
Uom: d.Uom,
|
||||
Infra_Id: d.Infra_Id,
|
||||
Infra: d.Infra,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Device) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package device
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ein "simrs-vx/internal/domain/main-entities/infra"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
)
|
||||
|
||||
type Device struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Uom_Code string `json:"uom_code" gorm:"size:10"`
|
||||
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ein.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id;references:Id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package diagnosesrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
}
|
||||
|
||||
func (d DiagnoseSrc) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
IndName: d.IndName,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []DiagnoseSrc) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package diagnosesrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type DiagnoseSrc struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:2048"`
|
||||
IndName string `json:"indName" gorm:"size:2048"`
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package district
|
||||
|
||||
import ev "simrs-vx/internal/domain/main-entities/village"
|
||||
|
||||
type CreateDto struct {
|
||||
Regency_Code string `json:"regency_code" validate:"numeric;maxLength=4"`
|
||||
Code string `json:"code" validate:"numeric;maxLength=6"`
|
||||
Name string `json:"name" validate:"alphaSpace;maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Regency_Code string `json:"regency_code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
Regency_Code string `json:"regency_code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Villages []*ev.Village `json:"villages,omitempty"`
|
||||
}
|
||||
|
||||
func (d District) ToResponse() ResponseDto {
|
||||
resp := ResponseDto(d)
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []District) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package district
|
||||
|
||||
import ev "simrs-vx/internal/domain/main-entities/village"
|
||||
|
||||
type District struct {
|
||||
Id uint32 `json:"id" gorm:"primaryKey"`
|
||||
Regency_Code string `json:"regency_code" gorm:"size:4"`
|
||||
Code string `json:"code" gorm:"unique;size:6"` // NOTE: THE PROPER SIZE IS 6
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Villages []*ev.Village `json:"villages,omitempty" gorm:"foreignKey:District_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package divisionposition
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/division"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Division_Id *uint16 `json:"division_id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Division_Id *uint16 `json:"division_id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Division_Id *uint16 `json:"division_id"`
|
||||
Division *ed.Division `json:"division,omitempty"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d DivisionPosition) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Division_Id: d.Division_Id,
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
if d.Division != nil {
|
||||
resp.Division = d.Division
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []DivisionPosition) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package divisionposition
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/division"
|
||||
)
|
||||
|
||||
type DivisionPosition struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Division_Id *uint16 `json:"division_id"`
|
||||
Division *ed.Division `json:"division" gorm:"foreignKey:Division_Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package division
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Parent_Id *int16 `json:"parent_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Parent_Id *int16 `json:"parent_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Parent_Id *int16 `json:"parent_id"`
|
||||
}
|
||||
|
||||
func (d Division) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Parent_Id: d.Parent_Id,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Division) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package division
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type Division struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Parent_Id *int16 `json:"parent_id"`
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package doctorfee
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty"`
|
||||
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d DoctorFee) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Doctor_Id: d.Doctor_Id,
|
||||
Doctor: d.Doctor,
|
||||
FeeType_Code: d.FeeType_Code,
|
||||
Price: d.Price,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []DoctorFee) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package doctorfee
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type DoctorFee struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
FeeType_Code *ero.DoctorFeeTypeCode `json:"feeType_code" gorm:"size:11"`
|
||||
Price *float64 `json:"price"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package doctor
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty"`
|
||||
}
|
||||
|
||||
func (d Doctor) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
SIP_Number: d.SIP_Number,
|
||||
Unit_Id: d.Unit_Id,
|
||||
Unit: d.Unit,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Doctor) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package doctor
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type Doctor struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
|
||||
SIP_Number *string `json:"sip_number" gorm:"size:20"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package employee
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/division"
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
eu "simrs-vx/internal/domain/main-entities/user"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.CreateDto `json:"user"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.CreateDto `json:"person"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
SIP_Number *string `json:"sip_number"`
|
||||
Unit_Id *uint `json:"unit_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
User_Id *uint `json:"user_id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
User_Id *uint `json:"user_id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Number *string `json:"number"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Division *ed.Division `json:"division,omitempty"`
|
||||
Number *string `json:"number"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d Employee) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
User_Id: d.User_Id,
|
||||
User: d.User,
|
||||
Person_Id: d.Person_Id,
|
||||
Position_Code: d.Position_Code,
|
||||
Division_Code: d.Division_Code,
|
||||
Division: d.Division,
|
||||
Number: d.Number,
|
||||
Status_Code: d.Status_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Employee) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func (c CreateDto) Sanitize() CreateDto {
|
||||
sanitized := c
|
||||
sanitized.User.Password = "[REDACTED]"
|
||||
return sanitized
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package employee
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/division"
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
eu "simrs-vx/internal/domain/main-entities/user"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Employee struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
User_Id *uint `json:"user_id"`
|
||||
User *eu.User `json:"user,omitempty" gorm:"foreignKey:User_Id;references:Id"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty" gorm:"foreignKey:Person_Id;references:Id"`
|
||||
Position_Code ero.EmployeePosisitionCode `json:"position_code" gorm:"not null;size:20"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Division *ed.Division `json:"division,omitempty" gorm:"foreignKey:Division_Code;references:Code"`
|
||||
Number *string `json:"number" gorm:"size:20"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package ethnic
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d Ethnic) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Ethnic) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package ethnic
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type Ethnic struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package infra
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d Infra) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
InfraGroup_Code: d.InfraGroup_Code,
|
||||
Parent_Id: d.Parent_Id,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Infra) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package infra
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Infra struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" gorm:"size:10"`
|
||||
Parent_Id *uint16 `json:"parent_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package installation
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code"`
|
||||
}
|
||||
|
||||
func (d Installation) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
EncounterClass_Code: d.EncounterClass_Code,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Installation) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package installation
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
)
|
||||
|
||||
type Installation struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" gorm:"size:10"`
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package insurancecompany
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
er "simrs-vx/internal/domain/main-entities/regency"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Regency_Code *string `json:"regency_code"`
|
||||
Address string `json:"address"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Regency_Code *string `json:"regency_code"`
|
||||
Address string `json:"address"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
PhoneNumber *string `json:"phoneNumber"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Regency_Code *string `json:"regency_code"`
|
||||
Regency *er.Regency `json:"regency,omitempty"`
|
||||
Address string `json:"address"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
}
|
||||
|
||||
func (d InsuranceCompany) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Regency_Code: d.Regency_Code,
|
||||
Regency: d.Regency,
|
||||
Address: d.Address,
|
||||
PhoneNumber: d.PhoneNumber,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []InsuranceCompany) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package insurancecompany
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
er "simrs-vx/internal/domain/main-entities/regency"
|
||||
)
|
||||
|
||||
type InsuranceCompany struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Regency_Code *string `json:"regency_code" gorm:"size:4"`
|
||||
Regency *er.Regency `json:"regency,omitempty" gorm:"foreignKey:Regency_Code;references:Code"`
|
||||
Address string `json:"address" gorm:"size:100"`
|
||||
PhoneNumber string `json:"phoneNumber" gorm:"size:20"`
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package itemprice
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eic "simrs-vx/internal/domain/main-entities/insurance-company"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Price float64 `json:"price"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Price float64 `json:"price"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
Price float64 `json:"price"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
|
||||
InsuranceCompany *eic.InsuranceCompany `json:"insuranceCompany,omitempty"`
|
||||
}
|
||||
|
||||
func (d ItemPrice) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
Price: d.Price,
|
||||
InsuranceCompany_Code: d.InsuranceCompany_Code,
|
||||
InsuranceCompany: d.InsuranceCompany,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ItemPrice) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package itemprice
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eic "simrs-vx/internal/domain/main-entities/insurance-company"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
)
|
||||
|
||||
type ItemPrice struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
Price float64 `json:"price"`
|
||||
InsuranceCompany_Code *string `json:"insuranceCompany_code" gorm:"size:20"`
|
||||
InsuranceCompany *eic.InsuranceCompany `json:"insuranceCompany,omitempty" gorm:"foreignKey:InsuranceCompany_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package item
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
ItemGroup_Code ero.ItemGroupCode `json:"itemGroup_code"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
ItemGroup_Code ero.ItemGroupCode `json:"itemGroup_code"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
ItemGroup_Code ero.ItemGroupCode `json:"itemGroup_code"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
Uom *eu.Uom `json:"uom,omitempty"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
}
|
||||
|
||||
func (d Item) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
ItemGroup_Code: d.ItemGroup_Code,
|
||||
Uom_Code: d.Uom_Code,
|
||||
Uom: d.Uom,
|
||||
Infra_Id: d.Infra_Id,
|
||||
Stock: d.Stock,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Item) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package item
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
|
||||
ero "simrs-vx/internal/domain/references/organization"
|
||||
)
|
||||
|
||||
type Item struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:50"`
|
||||
Name string `json:"name" gorm:"size:100"`
|
||||
ItemGroup_Code ero.ItemGroupCode `json:"itemGroup_code" gorm:"size:10"`
|
||||
Uom_Code *string `json:"uom_code" gorm:"size:10"`
|
||||
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package material
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ein "simrs-vx/internal/domain/main-entities/infra"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Uom_Code string `json:"uom_code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Uom_Code string `json:"uom_code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Uom_Code string `json:"uom_code"`
|
||||
Uom *eu.Uom `json:"uom,omitempty"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ein.Infra `json:"infra,omitempty"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d Material) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Uom_Code: d.Uom_Code,
|
||||
Uom: d.Uom,
|
||||
Infra_Id: d.Infra_Id,
|
||||
Infra: d.Infra,
|
||||
Stock: d.Stock,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Material) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package material
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ein "simrs-vx/internal/domain/main-entities/infra"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
)
|
||||
|
||||
type Material struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Uom_Code string `json:"uom_code" gorm:"size:10"`
|
||||
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ein.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id;references:Id"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package division
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Scope_Code *ere.CheckupScopeCode `json:"scope_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Scope_Code *ere.CheckupScopeCode `json:"scope_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Scope_Code *ere.CheckupScopeCode `json:"scope_code"`
|
||||
}
|
||||
|
||||
func (d McuSrcCategory) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Scope_Code: d.Scope_Code,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []McuSrcCategory) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package division
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
)
|
||||
|
||||
type McuSrcCategory struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Scope_Code *ere.CheckupScopeCode `json:"scope_code" gorm:"size:10"`
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package mcusrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
CheckupCategory_Code *string `json:"checkupCategory_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
CheckupCategory_Code *string `json:"checkupCategory_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
CheckupCategory_Code *string `json:"checkupCategory_code"`
|
||||
}
|
||||
|
||||
func (d McuSrc) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
CheckupCategory_Code: d.CheckupCategory_Code,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []McuSrc) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package mcusrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
emsc "simrs-vx/internal/domain/main-entities/mcu-src-category"
|
||||
)
|
||||
|
||||
type McuSrc struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
CheckupCategory_Code *string `json:"checkupCategory_code" gorm:"size:20"`
|
||||
CheckupCategory *emsc.McuSrcCategory `json:"checkupCategory,omitempty" gorm:"foreignKey:CheckupCategory_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package medicalactionsrcitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
emas "simrs-vx/internal/domain/main-entities/medical-action-src"
|
||||
eps "simrs-vx/internal/domain/main-entities/procedure-src"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc_id"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc_id"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc_id"`
|
||||
MedicalActionSrc *emas.MedicalActionSrc `json:"medicalActionSrc,omitempty"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc_id"`
|
||||
ProcedureSrc *eps.ProcedureSrc `json:"procedureSrc,omitempty"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d MedicalActionSrcItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
MedicalActionSrc_Id: d.MedicalActionSrc_Id,
|
||||
MedicalActionSrc: d.MedicalActionSrc,
|
||||
ProcedureSrc_Id: d.ProcedureSrc_Id,
|
||||
ProcedureSrc: d.ProcedureSrc,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MedicalActionSrcItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package medicalactionsrcitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
emas "simrs-vx/internal/domain/main-entities/medical-action-src"
|
||||
eps "simrs-vx/internal/domain/main-entities/procedure-src"
|
||||
)
|
||||
|
||||
type MedicalActionSrcItem struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
MedicalActionSrc_Id *uint `json:"medicalActionSrc_id"`
|
||||
MedicalActionSrc *emas.MedicalActionSrc `json:"medicalActionSrc,omitempty" gorm:"foreignKey:MedicalActionSrc_Id;references:Id"`
|
||||
ProcedureSrc_Id *uint `json:"procedureSrc_id"`
|
||||
ProcedureSrc *eps.ProcedureSrc `json:"procedureSrc,omitempty" gorm:"foreignKey:ProcedureSrc_Id;references:Id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package medicalactionsrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d MedicalActionSrc) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MedicalActionSrc) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package medicalactionsrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/item"
|
||||
)
|
||||
|
||||
type MedicalActionSrc struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package medicinegroup
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d MedicineGroup) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MedicineGroup) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package medicinegroup
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type MedicineGroup struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:50"`
|
||||
Name string `json:"name" gorm:"size:100"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package medicinemethod
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d MedicineMethod) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MedicineMethod) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package medicinemethod
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type MedicineMethod struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:50"`
|
||||
Name string `json:"name" gorm:"size:100"`
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package medicinemixitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
em "simrs-vx/internal/domain/main-entities/medicine"
|
||||
emm "simrs-vx/internal/domain/main-entities/medicine-mix"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Medicine *em.Medicine `json:"medicine,omitempty"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
}
|
||||
|
||||
func (d MedicineMixItem) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
MedicineMix_Id: d.MedicineMix_Id,
|
||||
MedicineMix: d.MedicineMix,
|
||||
Medicine_Id: d.Medicine_Id,
|
||||
Medicine: d.Medicine,
|
||||
Dose: d.Dose,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MedicineMixItem) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package medicinemixitem
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
em "simrs-vx/internal/domain/main-entities/medicine"
|
||||
emm "simrs-vx/internal/domain/main-entities/medicine-mix"
|
||||
)
|
||||
|
||||
type MedicineMixItem struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty" gorm:"foreignKey:MedicineMix_Id;references:Id"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
Medicine *em.Medicine `json:"medicine,omitempty" gorm:"foreignKey:Medicine_Id;references:Id"`
|
||||
Dose *uint8 `json:"dose"`
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package medicinemix
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d MedicineMix) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []MedicineMix) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package medicinemix
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type MedicineMix struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package medicine
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ein "simrs-vx/internal/domain/main-entities/infra"
|
||||
eit "simrs-vx/internal/domain/main-entities/item"
|
||||
emg "simrs-vx/internal/domain/main-entities/medicine-group"
|
||||
emm "simrs-vx/internal/domain/main-entities/medicine-method"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
MedicineGroup_Code *string `json:"medicineGroup_code"`
|
||||
MedicineMethod_Code *string `json:"medicineMethod_code"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
Dose uint8 `json:"dose"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
MedicineGroup_Code *string `json:"medicineGroup_code"`
|
||||
MedicineMethod_Code *string `json:"medicineMethod_code"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
Dose uint8 `json:"dose"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
MedicineGroup_Code *string `json:"medicineGroup_code"`
|
||||
MedicineGroup *emg.MedicineGroup `json:"medicineGroup"`
|
||||
MedicineMethod_Code *string `json:"medicineMethod_code"`
|
||||
MedicineMethod *emm.MedicineMethod `json:"medicineMethod"`
|
||||
Uom_Code *string `json:"uom_code"`
|
||||
Uom *eu.Uom `json:"uom"`
|
||||
Dose uint8 `json:"dose"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ein.Infra `json:"infra,omitempty"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *eit.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
func (d Medicine) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
MedicineGroup_Code: d.MedicineGroup_Code,
|
||||
MedicineGroup: d.MedicineGroup,
|
||||
MedicineMethod_Code: d.MedicineMethod_Code,
|
||||
MedicineMethod: d.MedicineMethod,
|
||||
Uom_Code: d.Uom_Code,
|
||||
Uom: d.Uom,
|
||||
Dose: d.Dose,
|
||||
Infra_Id: d.Infra_Id,
|
||||
Infra: d.Infra,
|
||||
Stock: d.Stock,
|
||||
Item_Id: d.Item_Id,
|
||||
Item: d.Item,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Medicine) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package medicine
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ein "simrs-vx/internal/domain/main-entities/infra"
|
||||
eit "simrs-vx/internal/domain/main-entities/item"
|
||||
emg "simrs-vx/internal/domain/main-entities/medicine-group"
|
||||
emm "simrs-vx/internal/domain/main-entities/medicine-method"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
)
|
||||
|
||||
type Medicine struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
MedicineGroup_Code *string `json:"medicineGroup_code" gorm:"size:10"`
|
||||
MedicineGroup *emg.MedicineGroup `json:"medicineGroup,omitempty" gorm:"foreignKey:MedicineGroup_Code;references:Code"`
|
||||
MedicineMethod_Code *string `json:"medicineMethod_code" gorm:"size:10"`
|
||||
MedicineMethod *emm.MedicineMethod `json:"medicineMethod,omitempty" gorm:"foreignKey:MedicineMethod_Code;references:Code"`
|
||||
Uom_Code *string `json:"uom_code" gorm:"size:10"`
|
||||
Uom *eu.Uom `json:"uom" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
Dose uint8 `json:"dose"`
|
||||
Infra_Id *uint16 `json:"infra_id"`
|
||||
Infra *ein.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id;references:Id"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *eit.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package nurse
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
func (d Nurse) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Nurse) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package nurse
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
)
|
||||
|
||||
type Nurse struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package nutritionist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
func (d Nutritionist) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Nutritionist) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package nutritionist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
)
|
||||
|
||||
type Nutritionist struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package personaddress
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Person_Id uint `json:"person_id"`
|
||||
Address string `json:"address"`
|
||||
Rt string `json:"rt"`
|
||||
Rw string `json:"rw"`
|
||||
Village_Code string `json:"village_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Person_Id uint `json:"person_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Person_Id uint `json:"person_id"`
|
||||
Address string `json:"address"`
|
||||
Rt string `json:"rt"`
|
||||
Rw string `json:"rw"`
|
||||
Village_Code string `json:"village_code"`
|
||||
}
|
||||
|
||||
func (d PersonAddress) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Person_Id: d.Person_Id,
|
||||
Address: d.Address,
|
||||
Rt: d.Rt,
|
||||
Rw: d.Rw,
|
||||
Village_Code: d.Village_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []PersonAddress) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package personaddress
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type PersonAddress struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id uint `json:"person_id"`
|
||||
Address string `json:"address" gorm:"size:150"`
|
||||
Rt string `json:"rt" gorm:"size:2"`
|
||||
Rw string `json:"rw" gorm:"size:2"`
|
||||
Village_Code string `json:"village_code" gorm:"size:10"`
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package personcontact
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Person_Id uint `json:"person_id"`
|
||||
Type_Code erp.ContactTypeCode `json:"type_code"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Person_Id uint `json:"person_id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Person_Id uint `json:"person_id"`
|
||||
Type_Code erp.ContactTypeCode `json:"type_code"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
func (d *PersonContact) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Person_Id: d.Person_Id,
|
||||
Type_Code: d.Type_Code,
|
||||
Value: d.Value,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []PersonContact) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package personcontact
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
)
|
||||
|
||||
type PersonContact struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id uint `json:"person_id"`
|
||||
Type_Code erp.ContactTypeCode `json:"type_code" gorm:"size:15"`
|
||||
Value string `json:"value" gorm:"size:100"`
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package person
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/ethnic"
|
||||
epa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
epc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name"`
|
||||
FrontTitle *string `json:"frontTitle"`
|
||||
EndTitle *string `json:"endTitle"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_code"`
|
||||
Education_Code *erp.EducationCode `json:"education_code"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code"`
|
||||
Ocupation_Name *string `json:"occupation_name"`
|
||||
Ethnic_Code *string `json:"ethnic_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Name string `json:"name"`
|
||||
FrontTitle *string `json:"frontTitle"`
|
||||
EndTitle *string `json:"endTitle"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_code"`
|
||||
Education_Code *erp.EducationCode `json:"education_code"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code"`
|
||||
Ocupation_Name *string `json:"occupation_name"`
|
||||
Ethnic_Code *string `json:"ethnic_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Name *string `json:"name"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Name string `json:"name"`
|
||||
FrontTitle *string `json:"frontTitle"`
|
||||
EndTitle *string `json:"endTitle"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_code"`
|
||||
Education_Code *erp.EducationCode `json:"education_code"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code"`
|
||||
Ocupation_Name *string `json:"occupation_name"`
|
||||
Ethnic_Code *string `json:"ethnic_code"`
|
||||
Ethnic *ee.Ethnic `json:"ethnic,omitempty"`
|
||||
Addresses *[]epa.PersonAddress `json:"addresses,omitempty"`
|
||||
Contacts *[]epc.PersonContact `json:"contacts,omitempty"`
|
||||
}
|
||||
|
||||
func (d *Person) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Name: d.Name,
|
||||
FrontTitle: d.FrontTitle,
|
||||
EndTitle: d.EndTitle,
|
||||
BirthDate: d.BirthDate,
|
||||
BirthRegency_Code: d.BirthRegency_Code,
|
||||
Gender_Code: d.Gender_Code,
|
||||
ResidentIdentityNumber: d.ResidentIdentityNumber,
|
||||
Religion_Code: d.Religion_Code,
|
||||
Education_Code: d.Education_Code,
|
||||
Ocupation_Code: d.Ocupation_Code,
|
||||
Ocupation_Name: d.Ocupation_Name,
|
||||
Ethnic_Code: d.Ethnic_Code,
|
||||
Ethnic: d.Ethnic,
|
||||
Addresses: d.Addresses,
|
||||
Contacts: d.Contacts,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Person) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package person
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/ethnic"
|
||||
epa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
epc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
erp "simrs-vx/internal/domain/references/person"
|
||||
|
||||
"time"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Name string `json:"name" gorm:"not null;size:150"`
|
||||
FrontTitle *string `json:"frontTitle" gorm:"size:50"`
|
||||
EndTitle *string `json:"endTitle" gorm:"size:50"`
|
||||
BirthDate *time.Time `json:"birthDate,omitempty"`
|
||||
BirthRegency_Code *string `json:"birthRegency_code" gorm:"size:4"`
|
||||
Gender_Code *erp.GenderCode `json:"gender_code" gorm:"size:10"`
|
||||
ResidentIdentityNumber *string `json:"residentIdentityNumber" gorm:"size:16"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_code" gorm:"size:10"`
|
||||
Education_Code *erp.EducationCode `json:"education_code" gorm:"size:10"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code" gorm:"size:15"`
|
||||
Ocupation_Name *string `json:"occupation_name" gorm:"size:50"`
|
||||
Ethnic_Code *string `json:"ethnic_code" gorm:"size:20"`
|
||||
Ethnic *ee.Ethnic `json:"ethnic,omitempty" gorm:"foreignKey:Ethnic_Code;references:Code"`
|
||||
Addresses *[]epa.PersonAddress `json:"addresses" gorm:"foreignKey:Person_Id"`
|
||||
Contacts *[]epc.PersonContact `json:"contacts" gorm:"foreignKey:Person_Id"`
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package pharmacist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty"`
|
||||
IHS_Number *string `json:"ihs_number"`
|
||||
}
|
||||
|
||||
func (d Pharmacist) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
IHS_Number: d.IHS_Number,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Pharmacist) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package pharmacist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
)
|
||||
|
||||
type Pharmacist struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
IHS_Number *string `json:"ihs_number" gorm:"size:20"`
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package pharmacycompany
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Regency_Code string `json:"regency_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Regency_Code string `json:"regency_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Regency_Code string `json:"regency_code"`
|
||||
}
|
||||
|
||||
func (d PharmacyCompany) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
Regency_Code: d.Regency_Code,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []PharmacyCompany) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package pharmacycompany
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type PharmacyCompany struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:20"`
|
||||
Name string `json:"name" gorm:"size:100"`
|
||||
Regency_Code string `json:"regency_code" gorm:"size:4"`
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package practiceschedule
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime"`
|
||||
EndTime *string `json:"endTime"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime"`
|
||||
EndTime *string `json:"endTime"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime"`
|
||||
EndTime *string `json:"endTime"`
|
||||
}
|
||||
|
||||
func (d PracticeSchedule) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Doctor_Id: d.Doctor_Id,
|
||||
Unit_Code: d.Unit_Code,
|
||||
Day_Code: d.Day_Code,
|
||||
StartTime: d.StartTime,
|
||||
EndTime: d.EndTime,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []PracticeSchedule) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package practiceschedule
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
)
|
||||
|
||||
type PracticeSchedule struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Doctor_Id *uint `json:"doctor_id"`
|
||||
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Id;references:Id"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
|
||||
Day_Code *erc.DayCode `json:"day_code"`
|
||||
StartTime *string `json:"startTime" gorm:"size:5"`
|
||||
EndTime *string `json:"endTime" gorm:"size:5"`
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package proceduresrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
IndName string `json:"indName"`
|
||||
}
|
||||
|
||||
func (d ProcedureSrc) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
IndName: d.IndName,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []ProcedureSrc) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package proceduresrc
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type ProcedureSrc struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:2048"`
|
||||
IndName string `json:"indName" gorm:"size:2048"`
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package province
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code" validate:"required;minLength=2;maxLength=2"`
|
||||
Name string `json:"name" validate:"required;maxLength=10"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id int16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id int16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id int16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
Id int16 `json:"id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d Province) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Id: d.Id,
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Province) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package province
|
||||
|
||||
import er "simrs-vx/internal/domain/main-entities/regency"
|
||||
|
||||
type Province struct {
|
||||
Id int16 `json:"id" gorm:"primaryKey"`
|
||||
Code string `json:"code" gorm:"unique;size:2"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Regencies []*er.Regency `json:"regencies,omitempty" gorm:"foreignKey:Province_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package regency
|
||||
|
||||
import ed "simrs-vx/internal/domain/main-entities/district"
|
||||
|
||||
type CreateDto struct {
|
||||
Province_Code string `json:"province_code" validate:"numeric;maxLength=2"`
|
||||
Code string `json:"code" validate:"numeric;maxLength=4"`
|
||||
Name string `json:"name" validate:"alphaSpace;maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Province_Code string `json:"province_code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Province_Code string `json:"province_code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Districts []*ed.District `json:"districts,omitempty"`
|
||||
}
|
||||
|
||||
func (d Regency) ToResponse() ResponseDto {
|
||||
resp := ResponseDto(d)
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Regency) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package regency
|
||||
|
||||
import ed "simrs-vx/internal/domain/main-entities/district"
|
||||
|
||||
type Regency struct {
|
||||
Id uint16 `json:"id" gorm:"primaryKey"`
|
||||
Province_Code string `json:"province_code" gorm:"size:2"`
|
||||
Code string `json:"code" gorm:"unique;size:4"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Districts []*ed.District `json:"districts,omitempty" gorm:"foreignKey:Regency_Code;references:Code"`
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package unit
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Installation_Id *uint16 `json:"installation_id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
FilterDto
|
||||
Includes string `json:"includes"`
|
||||
Preloads []string `json:"-"`
|
||||
}
|
||||
|
||||
type FilterDto struct {
|
||||
Installation_Id *uint16 `json:"installation_id"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Installation_Id *uint16 `json:"installation_id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Installation_Id *uint16 `json:"installation_id"`
|
||||
Installation *ei.Installation
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d Unit) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Installation_Id: d.Installation_Id,
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
if d.Installation != nil {
|
||||
resp.Installation = d.Installation
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Unit) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package unit
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
)
|
||||
|
||||
type Unit struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Installation_Id *uint16 `json:"installation_id"`
|
||||
Installation *ei.Installation `json:"installation" gorm:"foreignKey:Installation_Id"`
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package uom
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint16 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.SmallMain
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d Uom) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Code: d.Code,
|
||||
Name: d.Name,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Uom) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package uom
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type Uom struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name"`
|
||||
Password string `json:"password"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Name string `json:"name"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint `json:"id"`
|
||||
Name *string `json:"name"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type LoginDto struct {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Password string `json:"password" validate:"required"`
|
||||
Duration uint32 `json:"duration"` // in minutes
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
ecore.Main
|
||||
Name string `json:"name"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code"`
|
||||
FailedLoginCount uint8 `json:"failedLoginCount"`
|
||||
LastSuccessLogin *time.Time `json:"lastSuccessLogin,omitempty"`
|
||||
LastAllowdLogin *time.Time `json:"lastAllowdLogin,omitempty"`
|
||||
}
|
||||
|
||||
func (d *User) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Name: d.Name,
|
||||
Status_Code: d.Status_Code,
|
||||
FailedLoginCount: d.FailedLoginCount,
|
||||
LastSuccessLogin: d.LastSuccessLogin,
|
||||
LastAllowdLogin: d.LastAllowdLogin,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []User) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
func (c CreateDto) Sanitize() CreateDto {
|
||||
sanitized := c
|
||||
sanitized.Password = "[REDACTED]"
|
||||
return sanitized
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Name string `json:"name" gorm:"unique;not null;size:25"`
|
||||
Password string `json:"password" gorm:"not null;size:255"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
FailedLoginCount uint8 `json:"failedLoginCount" gorm:"type:smallint"`
|
||||
LoginAttemptCount int `json:"-"`
|
||||
LastSuccessLogin *time.Time `json:"lastSuccessLogin,omitempty"`
|
||||
LastAllowdLogin *time.Time `json:"lastAllowdLogin,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package village
|
||||
|
||||
type CreateDto struct {
|
||||
District_Code string `json:"district_code" validate:"numeric;maxLength=6"`
|
||||
Code string `json:"code" validate:"numeric;maxLength=10"`
|
||||
Name string `json:"name" validate:"alphaSpace;maxLength=50"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
District_Code string `json:"district_code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
NoPagination int `json:"no_pagination"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
Code *string `json:"code"`
|
||||
}
|
||||
|
||||
type UpdateDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
CreateDto
|
||||
}
|
||||
|
||||
type DeleteDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type ResponseDto struct {
|
||||
Id uint32 `json:"id"`
|
||||
District_Code string `json:"district_code"`
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (d Village) ToResponse() ResponseDto {
|
||||
resp := ResponseDto(d)
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Village) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
}
|
||||
return resp
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package village
|
||||
|
||||
type Village struct {
|
||||
Id uint32 `json:"id" gorm:"primaryKey"`
|
||||
District_Code string `json:"district_code" gorm:"size:6"` // NOT: THE PROPER SIZE IS 6
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package clinical
|
||||
|
||||
type (
|
||||
SubjectCode string
|
||||
ObjectCode string
|
||||
AssessmentCode string
|
||||
InstructionCode string
|
||||
)
|
||||
|
||||
const (
|
||||
SCPrimaryComplaint SubjectCode = "pri-compl" // Keluhan Utama
|
||||
SCSecComplaint SubjectCode = "sec-compl" // Secondary Complaint
|
||||
SCCurrentDiseaseHistory SubjectCode = "cur-disea-hist" // Current Disease History
|
||||
SCPastDiseaseHistory SubjectCode = "pas-disea-hist" // Past Disease History
|
||||
SCFamilyDiseaseHistory SubjectCode = "fam-disea-hist" // Family Disease History
|
||||
SCAllergyHistory SubjectCode = "alg-hist" // Allergic History
|
||||
SCAllergyReaction SubjectCode = "alg-react" // Allergic Reaction
|
||||
SCMedicationHistory SubjectCode = "med-hist" // Medication History
|
||||
|
||||
OCConsciousnessLevel ObjectCode = "consc-level" // Tingkat Kesadaran
|
||||
OCConsciousnessLevelDet ObjectCode = "consc-level-det" // Detail Tingkat Kesadaran
|
||||
OCSystolicBloodPressure ObjectCode = "syst-bp" // Tekanan Darah Systolic
|
||||
OCDiastolicBloodPressure ObjectCode = "diast-bp" // Tekanan Darah Diastolic
|
||||
OCHeartRate ObjectCode = "hear-rt" // Detak Jantung
|
||||
OCTemperature ObjectCode = "temp" // Suhu
|
||||
OCSpO2 ObjectCode = "spo2" // SpO2
|
||||
OCWeight ObjectCode = "weight" // Berat Badan
|
||||
OCHeight ObjectCode = "height" // Tinggi Badan
|
||||
|
||||
ACEarlyDiag AssessmentCode = "early-diag" // Diagnosis Awal
|
||||
ACLateDiag AssessmentCode = "late-diag" // Diagnosis Akhir
|
||||
ACSecDiag AssessmentCode = "sec-diag" // Diagnosis Sekunder
|
||||
|
||||
ICDetail InstructionCode = "detail" // Detail instruksi
|
||||
ICMedAct InstructionCode = "med-act" // Tindakan medis
|
||||
ICMedication InstructionCode = "medication" // Obat
|
||||
ICMaterial InstructionCode = "material" // BMHP
|
||||
)
|
||||
@@ -0,0 +1,100 @@
|
||||
package common
|
||||
|
||||
type (
|
||||
YaTidakCode byte
|
||||
SudahBelumCode byte
|
||||
AktifSimpelCode byte
|
||||
AktifAdvanceCode byte
|
||||
TersediaCode byte
|
||||
DayCode byte
|
||||
ActiveStatusCode string
|
||||
DataStatusCode string
|
||||
UserStatusCode string
|
||||
TimeUnitCode string
|
||||
PaymentMethodCode string
|
||||
)
|
||||
|
||||
const (
|
||||
TTTidak YaTidakCode = iota
|
||||
TTYa
|
||||
)
|
||||
|
||||
const (
|
||||
BSBelum SudahBelumCode = iota
|
||||
BSSudah
|
||||
)
|
||||
const (
|
||||
ASCInaktif AktifSimpelCode = iota
|
||||
ASCAktif
|
||||
)
|
||||
const (
|
||||
AACBaru AktifAdvanceCode = iota
|
||||
AACAktif
|
||||
AACBlokir
|
||||
AACHapus
|
||||
)
|
||||
|
||||
const (
|
||||
TCTidakTersedia TersediaCode = iota
|
||||
TCTersedia
|
||||
)
|
||||
|
||||
const (
|
||||
DCMinggu DayCode = iota
|
||||
DCSenin
|
||||
DCSelasa
|
||||
DCRabu
|
||||
DCKamis
|
||||
DCJumat
|
||||
DCSabtu
|
||||
)
|
||||
|
||||
const (
|
||||
SCActive ActiveStatusCode = "active" // Aktif
|
||||
SCInactive ActiveStatusCode = "inactive" // Tidak aktif
|
||||
|
||||
DSCNew DataStatusCode = "new" // Baru
|
||||
DSCReview DataStatusCode = "review" // Review
|
||||
DSCProcess DataStatusCode = "process" // Proses
|
||||
DSCDone DataStatusCode = "done" // Selesai
|
||||
DSCCancel DataStatusCode = "cancel" // Dibatalkan
|
||||
DSCRejected DataStatusCode = "rejected" // Ditolak
|
||||
DSCSkipped DataStatusCode = "skipped" // Dilewati
|
||||
|
||||
USCNew UserStatusCode = "new" // Baru
|
||||
USCActive UserStatusCode = "active" // Aktif
|
||||
USCInactive UserStatusCode = "inactive" // Tidak aktif
|
||||
USCBlocked UserStatusCode = "blocked" // Diblokir
|
||||
USCSuspended UserStatusCode = "suspended" // Dibekukan
|
||||
|
||||
TUCSec TimeUnitCode = "sec" // Detik
|
||||
TUCMin TimeUnitCode = "min" // Menit
|
||||
TUCHour TimeUnitCode = "hour" // Jam
|
||||
TUCDay TimeUnitCode = "day" // Hari
|
||||
TUCWeek TimeUnitCode = "week" // Minggu
|
||||
TUCMonth TimeUnitCode = "month" // Bulan
|
||||
TUCYear TimeUnitCode = "year" // Tahun
|
||||
|
||||
PMCCash PaymentMethodCode = "cash" // Tunai
|
||||
PMCDebit PaymentMethodCode = "debit" // Debet
|
||||
PMCCredit PaymentMethodCode = "credit" // Kredit
|
||||
PMCInsurance PaymentMethodCode = "insurance" // Asuransi
|
||||
PMCMembership PaymentMethodCode = "membership" // Member
|
||||
|
||||
)
|
||||
|
||||
func GetDayCodes() map[DayCode]string {
|
||||
return map[DayCode]string{
|
||||
DCMinggu: "Minggu",
|
||||
DCSenin: "Senin",
|
||||
DCSelasa: "Selasa",
|
||||
DCRabu: "Rabu",
|
||||
DCKamis: "Kamis",
|
||||
DCJumat: "Jumat",
|
||||
DCSabtu: "Sabtu",
|
||||
}
|
||||
}
|
||||
|
||||
func (obj DayCode) String() string {
|
||||
return GetDayCodes()[obj]
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package encounter
|
||||
|
||||
type (
|
||||
EncounterClassCode string
|
||||
QueueStatusCode string
|
||||
DischargeMethodCode string
|
||||
TransportationCode string
|
||||
PersonConditionCode string
|
||||
EmergencyClassCode string
|
||||
OutpatientClassCode string
|
||||
CheckupScopeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
ECOutpatient EncounterClassCode = "outpatient"
|
||||
ECAmbulatory EncounterClassCode = "ambulatory"
|
||||
ECEmergency EncounterClassCode = "emergency"
|
||||
ECInpatient EncounterClassCode = "inpatient"
|
||||
ECDraft EncounterClassCode = "draft"
|
||||
ECDone EncounterClassCode = "done"
|
||||
ECCancel EncounterClassCode = "cancel"
|
||||
ECSkip EncounterClassCode = "skip"
|
||||
|
||||
QSCWait QueueStatusCode = "wait" // Tunggu
|
||||
QSCProc QueueStatusCode = "proc" // Proses
|
||||
QSCDone QueueStatusCode = "done" // Selesai
|
||||
QSCCancel QueueStatusCode = "cancel" // Dibatalkan
|
||||
QSCSkip QueueStatusCode = "skip" // Dilewati
|
||||
|
||||
DMCHome DischargeMethodCode = "home" // Rumah
|
||||
DMCHomeReq DischargeMethodCode = "home-request" // Rumah (Dibutuhkan)
|
||||
|
||||
TCAmbulance TransportationCode = "ambulance"
|
||||
TCCar TransportationCode = "car"
|
||||
TCMotorCycle TransportationCode = "motor-cycle"
|
||||
TCOther TransportationCode = "other"
|
||||
|
||||
PCCRes PersonConditionCode = "res" // Resutiasi
|
||||
PCCEmg PersonConditionCode = "emg" // Darurat
|
||||
PCCUrg PersonConditionCode = "urg" // Mendesak
|
||||
PCCLurg PersonConditionCode = "lurg" // Kurang mendesak
|
||||
PCCNurg PersonConditionCode = "nurg" //
|
||||
PCCDoa PersonConditionCode = "doa" // Meninggal saat tiba
|
||||
|
||||
ECCEmg EmergencyClassCode = "emg" // Darurat/Emergency biasa
|
||||
ECCEon EmergencyClassCode = "eon" // Ponek/Emergency obstetri neonatal
|
||||
|
||||
OCCOp OutpatientClassCode = "op" // Rawat Jalan
|
||||
OCCIcu OutpatientClassCode = "icu" // ICU
|
||||
OCCHcu OutpatientClassCode = "hcu" // HCU
|
||||
OCCVk OutpatientClassCode = "vk" // Verlos kamer
|
||||
|
||||
CSCLab CheckupScopeCode = "lab" // Laboratorium
|
||||
CSCMLab CheckupScopeCode = "mic-lab" // Microbacterial Laboratorium
|
||||
CSCPLab CheckupScopeCode = "pa-lab" // Patology Anatomy Laboratorium
|
||||
CSCRad CheckupScopeCode = "radiology" // Radiology
|
||||
|
||||
)
|
||||
|
||||
func (ec EncounterClassCode) Code() string {
|
||||
switch ec {
|
||||
case ECAmbulatory, ECOutpatient:
|
||||
return "AMB"
|
||||
case ECInpatient:
|
||||
return "IMP"
|
||||
case ECEmergency:
|
||||
return "EMER"
|
||||
default:
|
||||
return "UNKNOWN"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package organization
|
||||
|
||||
type (
|
||||
EmployeePosisitionCode string
|
||||
ItemGroupCode string
|
||||
InfraGroupCode string
|
||||
UnitTypeCode string
|
||||
DoctorFeeTypeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
EPCDoc EmployeePosisitionCode = "doctor" // Dokter
|
||||
EPCNur EmployeePosisitionCode = "nurse" // Perawat
|
||||
EPCNut EmployeePosisitionCode = "nutritionist" // Ahli gizi
|
||||
EPCLab EmployeePosisitionCode = "laborant" // Laboran
|
||||
EPCPha EmployeePosisitionCode = "pharmacy" // Farmasi
|
||||
EPCPay EmployeePosisitionCode = "payment" // Pembayaran
|
||||
EPCPav EmployeePosisitionCode = "payment-verificator" // Konfirmasi pembayaran
|
||||
EPCMan EmployeePosisitionCode = "management" // Manajemen
|
||||
|
||||
ITGCInfra ItemGroupCode = "infra"
|
||||
ITGCMedicine ItemGroupCode = "medicine"
|
||||
ITGCDevice ItemGroupCode = "device"
|
||||
ITGCMaterial ItemGroupCode = "material"
|
||||
ITGCEmpFee ItemGroupCode = "employee-fee"
|
||||
ITGCDocFee ItemGroupCode = "doctor-fee"
|
||||
|
||||
IFGCBuilding InfraGroupCode = "building"
|
||||
IFGCFloor InfraGroupCode = "floor"
|
||||
IFGCRoom InfraGroupCode = "room"
|
||||
IFGCChamber InfraGroupCode = "chamber"
|
||||
IFGCBed InfraGroupCode = "bed"
|
||||
IFGCWarehouse InfraGroupCode = "warehouse"
|
||||
|
||||
UTCReg UnitTypeCode = "reg" // Registrasi
|
||||
UTCExa UnitTypeCode = "exa" // Pemeriksaan
|
||||
UTCPay UnitTypeCode = "pay" // Pembayaran
|
||||
UTCPha UnitTypeCode = "pha" // Farmasi
|
||||
UTCLab UnitTypeCode = "lab" // Laboratorium
|
||||
UTCRad UnitTypeCode = "rad" // Radiologi
|
||||
|
||||
DFTCOut DoctorFeeTypeCode = "outpatient" // Rawat Jalan
|
||||
DFTCInp DoctorFeeTypeCode = "inpatient" // Rawat Inap
|
||||
DFTCEme DoctorFeeTypeCode = "emergency" // Darurat
|
||||
DFTCReh DoctorFeeTypeCode = "medic-rehab" // Rehab Medik
|
||||
)
|
||||
@@ -0,0 +1,275 @@
|
||||
package person
|
||||
|
||||
type (
|
||||
GenderCode string
|
||||
BloodTypeCode string
|
||||
MaritalStatusCode string
|
||||
ReligionCode string
|
||||
EducationCode string
|
||||
OcupationCode string
|
||||
AgeGroupCode string
|
||||
AgeGroupForMedicineCode string
|
||||
RelativeCode string
|
||||
ContactTypeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
GCMale GenderCode = "male"
|
||||
GCFemale GenderCode = "female"
|
||||
GCNotStated GenderCode = "not-stated"
|
||||
GCUnknown GenderCode = "unknown"
|
||||
)
|
||||
|
||||
const (
|
||||
BTCAPositive BloodTypeCode = "A+"
|
||||
BTCANegative BloodTypeCode = "A-"
|
||||
BTCBPositive BloodTypeCode = "B+"
|
||||
BTCBNegative BloodTypeCode = "B-"
|
||||
BTCABPositive BloodTypeCode = "AB+"
|
||||
BTCABNegative BloodTypeCode = "AB-"
|
||||
BTCOPositive BloodTypeCode = "O+"
|
||||
BTCONegative BloodTypeCode = "O-"
|
||||
)
|
||||
|
||||
const (
|
||||
MSCBelumKawin MaritalStatusCode = "S"
|
||||
MSCKawin MaritalStatusCode = "M"
|
||||
MSCCeraiHidup MaritalStatusCode = "D"
|
||||
MSCCeraiMati MaritalStatusCode = "W"
|
||||
)
|
||||
|
||||
const (
|
||||
RCIslam ReligionCode = "islam"
|
||||
RCProtestan ReligionCode = "protestan"
|
||||
RCKatolik ReligionCode = "katolik"
|
||||
RCHindu ReligionCode = "hindu"
|
||||
RCBudha ReligionCode = "budha"
|
||||
RCKonghucu ReligionCode = "konghucu"
|
||||
)
|
||||
|
||||
const (
|
||||
ECTS EducationCode = "TS"
|
||||
ECTK EducationCode = "TK"
|
||||
ECSD EducationCode = "SD"
|
||||
ECSLTP EducationCode = "SMP"
|
||||
ECSLTA EducationCode = "SMA"
|
||||
ECD1 EducationCode = "D1"
|
||||
ECD2 EducationCode = "D2"
|
||||
ECD3 EducationCode = "D3"
|
||||
ECD4 EducationCode = "D4"
|
||||
ECS1 EducationCode = "S1"
|
||||
ECS2 EducationCode = "S2"
|
||||
ECS3 EducationCode = "S3"
|
||||
)
|
||||
|
||||
const (
|
||||
OCTidakBekerja OcupationCode = "tidak-bekerja"
|
||||
OCPns OcupationCode = "pns"
|
||||
OCTniPolisi OcupationCode = "polisi"
|
||||
OCTni OcupationCode = "tni"
|
||||
OCGuru OcupationCode = "guru"
|
||||
OCWiraswasta OcupationCode = "wiraswasta"
|
||||
OCKarySwasta OcupationCode = "kary-swasta"
|
||||
OCLainlain OcupationCode = "lainnya"
|
||||
)
|
||||
|
||||
const (
|
||||
AGCEUnknown AgeGroupCode = "unkown"
|
||||
AGCLTE5 AgeGroupCode = "LT5"
|
||||
AGCEU19 AgeGroupCode = "UE19"
|
||||
AGCEU29 AgeGroupCode = "UE29"
|
||||
AGCEU39 AgeGroupCode = "UE39"
|
||||
AGCEU49 AgeGroupCode = "UE49"
|
||||
AGCEU59 AgeGroupCode = "UE50"
|
||||
AGCGE60 AgeGroupCode = "E60"
|
||||
)
|
||||
|
||||
const (
|
||||
AGMCNew AgeGroupForMedicineCode = "new-born"
|
||||
AGMCInfant AgeGroupForMedicineCode = "infant"
|
||||
AGMCToddler AgeGroupForMedicineCode = "toddler"
|
||||
AGMCKid AgeGroupForMedicineCode = "kid"
|
||||
AGMCAdult AgeGroupForMedicineCode = "adult"
|
||||
)
|
||||
|
||||
const (
|
||||
RCMSuami RelativeCode = "suami"
|
||||
RCMIstri RelativeCode = "istri"
|
||||
RCMAnak RelativeCode = "anak"
|
||||
RCMMenantu RelativeCode = "menantu"
|
||||
RCMCucu RelativeCode = "cucu"
|
||||
RCMOrangTua RelativeCode = "orang-tua"
|
||||
RCMMertua RelativeCode = "mertua"
|
||||
RCMAdik RelativeCode = "adik"
|
||||
RCMKeponakan RelativeCode = "keponakan"
|
||||
RCMKakak RelativeCode = "kakak"
|
||||
RCMPaman RelativeCode = "paman"
|
||||
RCMBibi RelativeCode = "bibi"
|
||||
RCMPamanKakek RelativeCode = "kakek"
|
||||
RCMPamanNenek RelativeCode = "nenek"
|
||||
)
|
||||
|
||||
const (
|
||||
CTPhone ContactTypeCode = "phone"
|
||||
CTMPhone ContactTypeCode = "m-phone"
|
||||
CTEmail ContactTypeCode = "email"
|
||||
CTFax ContactTypeCode = "fax"
|
||||
)
|
||||
|
||||
func GetGenderCodes() map[GenderCode]string {
|
||||
return map[GenderCode]string{
|
||||
GCMale: "Laki-laki",
|
||||
GCFemale: "Perempuan",
|
||||
GCNotStated: "Tidak disebutkan",
|
||||
GCUnknown: "Tidak diketahui",
|
||||
}
|
||||
}
|
||||
|
||||
func GetBloodTypeCodes() map[BloodTypeCode]string {
|
||||
return map[BloodTypeCode]string{
|
||||
BTCAPositive: "A Positive",
|
||||
BTCANegative: "A Negative",
|
||||
BTCABPositive: "AB Positive",
|
||||
BTCABNegative: "AB Negative",
|
||||
BTCBPositive: "B Positive",
|
||||
BTCBNegative: "B Negative",
|
||||
BTCOPositive: "O Positive",
|
||||
BTCONegative: "O Negative",
|
||||
}
|
||||
}
|
||||
|
||||
func GetMaritalStatusCodes() map[MaritalStatusCode]string {
|
||||
return map[MaritalStatusCode]string{
|
||||
MSCBelumKawin: "Belum Kawin",
|
||||
MSCKawin: "Kawin",
|
||||
MSCCeraiHidup: "Cerai Hidup",
|
||||
MSCCeraiMati: "Cerai Mati",
|
||||
}
|
||||
}
|
||||
|
||||
func GetReligionCodes() map[ReligionCode]string {
|
||||
return map[ReligionCode]string{
|
||||
RCIslam: "Islam",
|
||||
RCProtestan: "Kristen (Protestan)",
|
||||
RCKatolik: "Katolik",
|
||||
RCHindu: "Hindu",
|
||||
RCBudha: "Budha",
|
||||
RCKonghucu: "Konghucu",
|
||||
}
|
||||
}
|
||||
|
||||
func GetEducationCodes() map[EducationCode]string {
|
||||
return map[EducationCode]string{
|
||||
ECTS: "Tidak Sekolah",
|
||||
ECTK: "TK",
|
||||
ECSD: "SD",
|
||||
ECSLTP: "SMP sederajat",
|
||||
ECSLTA: "SMP sederajat",
|
||||
ECD1: "D1 sederajat",
|
||||
ECD2: "D2 sederajat",
|
||||
ECD3: "D3 sederajat",
|
||||
ECD4: "D4 sederajat",
|
||||
ECS1: "S1",
|
||||
ECS2: "S3",
|
||||
ECS3: "S3",
|
||||
}
|
||||
}
|
||||
|
||||
func GetOcupationCodes() map[OcupationCode]string {
|
||||
return map[OcupationCode]string{
|
||||
OCTidakBekerja: "Tidak Bekerja",
|
||||
OCPns: "PNS",
|
||||
OCTniPolisi: "Polisi",
|
||||
OCTni: "TNI",
|
||||
OCGuru: "Guru",
|
||||
OCWiraswasta: "Wiraswasta",
|
||||
OCKarySwasta: "Kary Swasta",
|
||||
OCLainlain: "Lain-lain",
|
||||
}
|
||||
}
|
||||
|
||||
func GetAgeGroupCodes() map[AgeGroupCode]string {
|
||||
return map[AgeGroupCode]string{
|
||||
AGCEUnknown: "unknown",
|
||||
AGCLTE5: "<=5",
|
||||
AGCEU19: "6-19",
|
||||
AGCEU29: "20-29",
|
||||
AGCEU39: "30-39",
|
||||
AGCEU49: "40-49",
|
||||
AGCEU59: "50-59",
|
||||
AGCGE60: ">=60",
|
||||
}
|
||||
}
|
||||
|
||||
func GetAgeGroupForMedicineCodes() map[AgeGroupForMedicineCode]string {
|
||||
return map[AgeGroupForMedicineCode]string{
|
||||
AGMCNew: "new-born",
|
||||
AGMCInfant: "infant",
|
||||
AGMCToddler: "toddler",
|
||||
AGMCKid: "kid",
|
||||
AGMCAdult: "adult",
|
||||
}
|
||||
}
|
||||
|
||||
func GetRelativeCodes() map[RelativeCode]string {
|
||||
return map[RelativeCode]string{
|
||||
RCMSuami: "Suami",
|
||||
RCMIstri: "Istri",
|
||||
RCMAnak: "Anak",
|
||||
RCMMenantu: "Menantu",
|
||||
RCMCucu: "Cucu",
|
||||
RCMOrangTua: "Orang Tua",
|
||||
RCMMertua: "Mertua",
|
||||
RCMAdik: "Adik",
|
||||
RCMKeponakan: "Keponakan",
|
||||
RCMKakak: "Kakak",
|
||||
RCMPaman: "Paman",
|
||||
RCMBibi: "Bibi",
|
||||
RCMPamanKakek: "Kakek",
|
||||
RCMPamanNenek: "Nenek",
|
||||
}
|
||||
}
|
||||
|
||||
func GetContactTypeCodes() map[ContactTypeCode]string {
|
||||
return map[ContactTypeCode]string{
|
||||
CTPhone: "Telepon",
|
||||
CTMPhone: "Telepon Seluler",
|
||||
CTEmail: "Email",
|
||||
CTFax: "Fax",
|
||||
}
|
||||
}
|
||||
|
||||
func (obj GenderCode) String() string {
|
||||
return GetGenderCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj BloodTypeCode) String() string {
|
||||
return GetBloodTypeCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj MaritalStatusCode) String() string {
|
||||
return GetMaritalStatusCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj ReligionCode) String() string {
|
||||
return GetReligionCodes()[obj]
|
||||
}
|
||||
func (obj EducationCode) String() string {
|
||||
return GetEducationCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj OcupationCode) String() string {
|
||||
return GetOcupationCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj AgeGroupCode) String() string {
|
||||
return GetAgeGroupCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj RelativeCode) String() string {
|
||||
return GetRelativeCodes()[obj]
|
||||
}
|
||||
|
||||
func (obj ContactTypeCode) String() string {
|
||||
return GetContactTypeCodes()[obj]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user