refactor several data source tables from id into code

This commit is contained in:
dpurbosakti
2025-11-12 16:57:52 +07:00
parent 94ce6bd5ee
commit ccc341be34
73 changed files with 388 additions and 281 deletions
+15 -15
View File
@@ -279,8 +279,8 @@ func SetRoutes() http.Handler {
hc.RegCrud(r, "/v1/employee", employee.O)
hc.RegCrudByCode(r, "/v1/doctor", doctor.O)
hc.RegCrudByCode(r, "/v1/nurse", nurse.O)
hc.RegCrud(r, "/v1/nutritionist", nutritionist.O)
hc.RegCrud(r, "/v1/pharmacist", pharmacist.O)
hc.RegCrudByCode(r, "/v1/nutritionist", nutritionist.O)
hc.RegCrudByCode(r, "/v1/pharmacist", pharmacist.O)
hk.GroupRoutes("/v1/user", r, hk.MapHandlerFunc{
"GET /": user.O.GetList,
"GET /{id}": user.O.GetDetail,
@@ -314,18 +314,18 @@ func SetRoutes() http.Handler {
hc.RegCrudByCode(r, "/v1/specialist-position", specialistposition.O)
hc.RegCrudByCode(r, "/v1/subspecialist-position", subspecialistposition.O)
hc.RegCrudByCode(r, "/v1/infra", infra.O)
hc.RegCrud(r, "/v1/pharmacy-company", pharmacycompany.O)
hc.RegCrud(r, "/v1/diagnose-src", diagnosesrc.O)
hc.RegCrud(r, "/v1/procedure-src", proceduresrc.O)
hc.RegCrud(r, "/v1/uom", uom.O)
hc.RegCrudByCode(r, "/v1/pharmacy-company", pharmacycompany.O)
hc.RegCrudByCode(r, "/v1/diagnose-src", diagnosesrc.O)
hc.RegCrudByCode(r, "/v1/procedure-src", proceduresrc.O)
hc.RegCrudByCode(r, "/v1/uom", uom.O)
hc.RegCrudByCode(r, "/v1/item", item.O)
hc.RegCrud(r, "/v1/item-price", itemprice.O)
hc.RegCrud(r, "/v1/medicine-group", medicinegroup.O)
hc.RegCrud(r, "/v1/medicine-method", medicinemethod.O)
hc.RegCrud(r, "/v1/mcu-src-category", mcusrccategory.O)
hc.RegCrudByCode(r, "/v1/medicine-group", medicinegroup.O)
hc.RegCrudByCode(r, "/v1/medicine-method", medicinemethod.O)
hc.RegCrudByCode(r, "/v1/mcu-src-category", mcusrccategory.O)
hc.RegCrudByCode(r, "/v1/mcu-src", mcusrc.O)
hc.RegCrudByCode(r, "/v1/ethnic", ethnic.O)
hc.RegCrud(r, "/v1/insurance-company", insurancecompany.O)
hc.RegCrudByCode(r, "/v1/insurance-company", insurancecompany.O)
hc.RegCrudByCode(r, "/v1/medicine", medicine.O)
hc.RegCrudByCode(r, "/v1/device", device.O)
hc.RegCrudByCode(r, "/v1/material", material.O)
@@ -338,11 +338,11 @@ func SetRoutes() http.Handler {
hc.RegCrud(r, "/v1/vehicle-hist", vehiclehist.O)
hc.RegCrud(r, "/v1/edu-assessment", eduassesment.O)
hc.RegCrud(r, "/v1/village", village.O)
hc.RegCrud(r, "/v1/district", district.O)
hc.RegCrud(r, "/v1/regency", regency.O)
hc.RegCrud(r, "/v1/province", province.O)
hc.RegCrud(r, "/v1/postal-region", postalregion.O)
hc.RegCrudByCode(r, "/v1/village", village.O)
hc.RegCrudByCode(r, "/v1/district", district.O)
hc.RegCrudByCode(r, "/v1/regency", regency.O)
hc.RegCrudByCode(r, "/v1/province", province.O)
hc.RegCrudByCode(r, "/v1/postal-region", postalregion.O)
/////
return cmw.SetCors(handlerlogger.SetLog(r))