feat/user: moved Registration to Registrator
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
-- Create "Registrator" table
|
||||
CREATE TABLE "public"."Registrator" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Employee_Id" bigint NULL,
|
||||
"Installation_Code" character varying(20) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_Registrator_Employee" FOREIGN KEY ("Employee_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Registrator_Installation" FOREIGN KEY ("Installation_Code") REFERENCES "public"."Installation" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Drop "Registration" table
|
||||
DROP TABLE "public"."Registration";
|
||||
@@ -1,4 +1,4 @@
|
||||
h1:YJzcjq4dKD7GKlV0GJ88TOtZgg0JRDcVMlAe5ZYT9/U=
|
||||
h1:B/ZKq0d90aqLf0EvQfND4cd8ZRHcmxfzKF2N1lpSeIs=
|
||||
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
|
||||
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
|
||||
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
|
||||
@@ -157,4 +157,5 @@ h1:YJzcjq4dKD7GKlV0GJ88TOtZgg0JRDcVMlAe5ZYT9/U=
|
||||
20251209025908.sql h1:p3kZA8kyEj+mQZSrdY3k2K1NojQzFJh/MlZJ0Oy6t/k=
|
||||
20251209030538.sql h1:zltV6/Fu2zJW0/lVBl7MdnWuJcqNTUIRcqYYZ8Fi1wo=
|
||||
20251209064304.sql h1:Mj6Zh+2b/4AkM1HjnJGjAs788kVN0UaL34jeaKQIjT0=
|
||||
20251209070128.sql h1:rdqSlAmJS5XSc1w9dka3C53zwgibQwRIUqBcgmIPoTM=
|
||||
20251209070128.sql h1:ip4wNCIF/UFQlNo6KpFG87/XA08aG3/Rf5zpxz3xioY=
|
||||
20251209084929.sql h1:Z5higP1Ecq5UPWhrWZ5UCrxddMNqiJi8PbCNvGBE48A=
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
@@ -51,7 +51,7 @@ type ResponseDto struct {
|
||||
Installation *ei.Installation `json:"installation,omitempty"`
|
||||
}
|
||||
|
||||
func (d Registration) ToResponse() ResponseDto {
|
||||
func (d Registrator) ToResponse() ResponseDto {
|
||||
resp := ResponseDto{
|
||||
Employee_Id: d.Employee_Id,
|
||||
Employee: d.Employee,
|
||||
@@ -62,7 +62,7 @@ func (d Registration) ToResponse() ResponseDto {
|
||||
return resp
|
||||
}
|
||||
|
||||
func ToResponseList(data []Registration) []ResponseDto {
|
||||
func ToResponseList(data []Registrator) []ResponseDto {
|
||||
resp := make([]ResponseDto, len(data))
|
||||
for i, u := range data {
|
||||
resp[i] = u.ToResponse()
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
ei "simrs-vx/internal/domain/main-entities/installation"
|
||||
)
|
||||
|
||||
type Registration struct {
|
||||
type Registrator 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"`
|
||||
@@ -13,23 +13,24 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Name string `json:"name" validate:"maxLength=25"`
|
||||
Password string `json:"password" validate:"maxLength=255"`
|
||||
Name string `json:"name" validate:"required;maxLength=50"`
|
||||
Password string `json:"password" validate:"required;maxLength=255"`
|
||||
ContractPosition_Code erg.ContractPositionCode `json:"contractPosition_code" gorm:"not null;size:20" validate:"required"`
|
||||
Status_Code erc.UserStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
Employee *EmployeUpdateDto `json:"employee"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Installation_Code *string `json:"installation_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
ContractPosition_Code erg.ContractPositionCode `json:"contractPosition_code" gorm:"not null;size:20"`
|
||||
|
||||
Employee *EmployeUpdateDto `json:"employee"`
|
||||
Person *ep.UpdateDto `json:"person"`
|
||||
PersonAddresses []epa.UpdateDto `json:"personAddresses"`
|
||||
PersonContacts []epc.UpdateDto `json:"personContacts"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Code *string `json:"code" validate:"maxLength=20"`
|
||||
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
Installation_Code *string `json:"installation_code"`
|
||||
Unit_Code *string `json:"unit_code"`
|
||||
Specialist_Code *string `json:"specialist_code"`
|
||||
Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -88,11 +89,20 @@ func (d *User) ToResponse() ResponseDto {
|
||||
type EmployeUpdateDto struct {
|
||||
Id uint `json:"id"`
|
||||
User_Id *uint `json:"-"`
|
||||
Person_Id *uint `json:"-"`
|
||||
Division_Code *string `json:"division_code"`
|
||||
Number *string `json:"number" validate:"maxLength=20"`
|
||||
Position_Code erg.EmployeePositionCode `json:"position_code" validate:"maxLength=20"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" validate:"maxLength=10"`
|
||||
Person_Id *uint `json:"-"`
|
||||
// TODO: Extras
|
||||
// Code *string `json:"code" validate:"maxLength=20"`
|
||||
// IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
|
||||
// SIP_Number *string `json:"sip_number" validate:"maxLength=20"`
|
||||
// Installation_Code *string `json:"installation_code"`
|
||||
// Unit_Code *string `json:"unit_code"`
|
||||
// Specialist_Code *string `json:"specialist_code"`
|
||||
// Subspecialist_Code *string `json:"subspecialist_code"`
|
||||
// Infra_Code *string `json:"infra_code"`
|
||||
}
|
||||
|
||||
func ToResponseList(data []User) []ResponseDto {
|
||||
|
||||
@@ -96,7 +96,7 @@ import (
|
||||
radiologymcuorder "simrs-vx/internal/domain/main-entities/radiology-mcu-order"
|
||||
radiologymcuorderitem "simrs-vx/internal/domain/main-entities/radiology-mcu-order-item"
|
||||
regency "simrs-vx/internal/domain/main-entities/regency"
|
||||
registration "simrs-vx/internal/domain/main-entities/registration"
|
||||
registrator "simrs-vx/internal/domain/main-entities/registrator"
|
||||
rehab "simrs-vx/internal/domain/main-entities/rehab"
|
||||
responsibledoctorhist "simrs-vx/internal/domain/main-entities/responsible-doctor-hist"
|
||||
resume "simrs-vx/internal/domain/main-entities/resume"
|
||||
@@ -149,7 +149,7 @@ func getMainEntities() []any {
|
||||
&proceduresrc.ProcedureSrc{},
|
||||
&employee.Employee{},
|
||||
&intern.Intern{},
|
||||
®istration.Registration{},
|
||||
®istrator.Registrator{},
|
||||
&doctor.Doctor{},
|
||||
&nurse.Nurse{},
|
||||
&nutritionist.Nutritionist{},
|
||||
|
||||
@@ -26,6 +26,7 @@ import (
|
||||
em "simrs-vx/internal/domain/main-entities/midwife"
|
||||
en "simrs-vx/internal/domain/main-entities/nurse"
|
||||
ep "simrs-vx/internal/domain/main-entities/pharmacist"
|
||||
er "simrs-vx/internal/domain/main-entities/registrator"
|
||||
esp "simrs-vx/internal/domain/main-entities/specialist-position"
|
||||
essp "simrs-vx/internal/domain/main-entities/subspecialist-position"
|
||||
eup "simrs-vx/internal/domain/main-entities/unit-position"
|
||||
@@ -265,6 +266,16 @@ func populateRoles(user *eu.User, input eu.LoginDto, atClaims jwt.MapClaims, out
|
||||
}
|
||||
atClaims["pharmacist_code"] = empData.Code
|
||||
outputData["pharmacist_code"] = empData.Code
|
||||
case erg.EPCReg:
|
||||
empData := er.Registrator{}
|
||||
dg.I.Where("\"Employee_Id\" = ?", employee.Id).First(&empData)
|
||||
if empData.Id == 0 {
|
||||
return d.FieldErrors{"authentication": d.FieldError{Code: "auth-noRegistrator", Message: pl.GenMessage("auth-noRegistrator")}}
|
||||
}
|
||||
atClaims["registrator_id"] = empData.Id
|
||||
outputData["registrator_id"] = empData.Id
|
||||
atClaims["installation_code"] = empData.Installation_Code
|
||||
outputData["installation_code"] = empData.Installation_Code
|
||||
}
|
||||
|
||||
errorGetPosition := d.FieldErrors{"authentication": d.FieldError{Code: "auth-getData-failed", Message: pl.GenMessage("auth-getData-failed")}}
|
||||
|
||||
+9
-9
@@ -1,4 +1,4 @@
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
@@ -7,16 +7,16 @@ import (
|
||||
d "github.com/karincake/dodol"
|
||||
"gorm.io/gorm"
|
||||
|
||||
e "simrs-vx/internal/domain/main-entities/registration"
|
||||
e "simrs-vx/internal/domain/main-entities/registrator"
|
||||
|
||||
pl "simrs-vx/pkg/logger"
|
||||
pu "simrs-vx/pkg/use-case-helper"
|
||||
)
|
||||
|
||||
const source = "doctor"
|
||||
const source = "registrator"
|
||||
|
||||
func Create(input e.CreateDto) (*d.Data, error) {
|
||||
data := e.Registration{}
|
||||
data := e.Registrator{}
|
||||
|
||||
event := pl.Event{
|
||||
Feature: "Create",
|
||||
@@ -66,8 +66,8 @@ func Create(input e.CreateDto) (*d.Data, error) {
|
||||
}
|
||||
|
||||
func ReadList(input e.ReadListDto) (*d.Data, error) {
|
||||
var data *e.Registration
|
||||
var dataList []e.Registration
|
||||
var data *e.Registrator
|
||||
var dataList []e.Registrator
|
||||
var metaList *e.MetaDto
|
||||
var err error
|
||||
|
||||
@@ -119,7 +119,7 @@ func ReadList(input e.ReadListDto) (*d.Data, error) {
|
||||
}
|
||||
|
||||
func ReadDetail(input e.ReadDetailDto) (*d.Data, error) {
|
||||
var data *e.Registration
|
||||
var data *e.Registrator
|
||||
var err error
|
||||
|
||||
event := pl.Event{
|
||||
@@ -167,7 +167,7 @@ func ReadDetail(input e.ReadDetailDto) (*d.Data, error) {
|
||||
|
||||
func Update(input e.UpdateDto) (*d.Data, error) {
|
||||
rdDto := e.ReadDetailDto{Id: input.Id}
|
||||
var data *e.Registration
|
||||
var data *e.Registrator
|
||||
var err error
|
||||
|
||||
event := pl.Event{
|
||||
@@ -223,7 +223,7 @@ func Update(input e.UpdateDto) (*d.Data, error) {
|
||||
|
||||
func Delete(input e.DeleteDto) (*d.Data, error) {
|
||||
rdDto := e.ReadDetailDto{Id: &input.Id}
|
||||
var data *e.Registration
|
||||
var data *e.Registrator
|
||||
var err error
|
||||
|
||||
event := pl.Event{
|
||||
+3
-3
@@ -2,13 +2,13 @@
|
||||
DESCRIPTION:
|
||||
Any functions that are used internally by the use-case
|
||||
*/
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
import (
|
||||
e "simrs-vx/internal/domain/main-entities/registration"
|
||||
e "simrs-vx/internal/domain/main-entities/registrator"
|
||||
)
|
||||
|
||||
func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Registration) {
|
||||
func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Registrator) {
|
||||
var inputSrc *e.CreateDto
|
||||
if inputT, ok := any(input).(*e.CreateDto); ok {
|
||||
inputSrc = inputT
|
||||
+16
-16
@@ -1,8 +1,8 @@
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
e "simrs-vx/internal/domain/main-entities/registration"
|
||||
e "simrs-vx/internal/domain/main-entities/registrator"
|
||||
|
||||
plh "simrs-vx/pkg/lib-helper"
|
||||
pl "simrs-vx/pkg/logger"
|
||||
@@ -13,10 +13,10 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func CreateData(input e.CreateDto, event *pl.Event, dbx ...*gorm.DB) (*e.Registration, error) {
|
||||
func CreateData(input e.CreateDto, event *pl.Event, dbx ...*gorm.DB) (*e.Registrator, error) {
|
||||
pl.SetLogInfo(event, nil, "started", "DBCreate")
|
||||
|
||||
data := e.Registration{}
|
||||
data := e.Registrator{}
|
||||
setData(&input, &data)
|
||||
|
||||
var tx *gorm.DB
|
||||
@@ -34,9 +34,9 @@ func CreateData(input e.CreateDto, event *pl.Event, dbx ...*gorm.DB) (*e.Registr
|
||||
return &data, nil
|
||||
}
|
||||
|
||||
func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Registration, *e.MetaDto, error) {
|
||||
func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Registrator, *e.MetaDto, error) {
|
||||
pl.SetLogInfo(event, input, "started", "DBReadList")
|
||||
data := []e.Registration{}
|
||||
data := []e.Registrator{}
|
||||
pagination := gh.Pagination{}
|
||||
count := int64(0)
|
||||
meta := e.MetaDto{}
|
||||
@@ -49,7 +49,7 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Re
|
||||
}
|
||||
|
||||
tx = tx.
|
||||
Model(&e.Registration{}).
|
||||
Model(&e.Registrator{}).
|
||||
Scopes(gh.Preload(input.Includes)).
|
||||
Scopes(gh.Filter(input.FilterDto)).
|
||||
Count(&count).
|
||||
@@ -71,9 +71,9 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.Re
|
||||
return data, &meta, nil
|
||||
}
|
||||
|
||||
func ReadDetailData(input e.ReadDetailDto, event *pl.Event, dbx ...*gorm.DB) (*e.Registration, error) {
|
||||
func ReadDetailData(input e.ReadDetailDto, event *pl.Event, dbx ...*gorm.DB) (*e.Registrator, error) {
|
||||
pl.SetLogInfo(event, input, "started", "DBReadDetail")
|
||||
data := e.Registration{}
|
||||
data := e.Registrator{}
|
||||
|
||||
var tx *gorm.DB
|
||||
if len(dbx) > 0 {
|
||||
@@ -99,7 +99,7 @@ func ReadDetailData(input e.ReadDetailDto, event *pl.Event, dbx ...*gorm.DB) (*e
|
||||
return &data, nil
|
||||
}
|
||||
|
||||
func UpdateData(input e.UpdateDto, data *e.Registration, event *pl.Event, dbx ...*gorm.DB) error {
|
||||
func UpdateData(input e.UpdateDto, data *e.Registrator, event *pl.Event, dbx ...*gorm.DB) error {
|
||||
pl.SetLogInfo(event, data, "started", "DBUpdate")
|
||||
setData(&input, data)
|
||||
|
||||
@@ -124,7 +124,7 @@ func UpdateData(input e.UpdateDto, data *e.Registration, event *pl.Event, dbx ..
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeleteData(data *e.Registration, event *pl.Event, dbx ...*gorm.DB) error {
|
||||
func DeleteData(data *e.Registrator, event *pl.Event, dbx ...*gorm.DB) error {
|
||||
pl.SetLogInfo(event, data, "started", "DBDelete")
|
||||
var tx *gorm.DB
|
||||
if len(dbx) > 0 {
|
||||
@@ -156,13 +156,13 @@ func GetIdByUserId(user_id *uint, event *pl.Event, dbx ...*gorm.DB) (*uint, erro
|
||||
tx = dg.I
|
||||
}
|
||||
|
||||
var doctor_id uint
|
||||
var registrator_id uint
|
||||
|
||||
err := tx.Model(&e.Registration{}).
|
||||
Select("\"Doctor\".\"Id\" as doctor_id").
|
||||
err := tx.Model(&e.Registrator{}).
|
||||
Select("\"Doctor\".\"Id\" as registrator_id").
|
||||
Joins("JOIN \"Employee\" as e ON e.\"Id\" = \"Doctor\".\"Employee_Id\"").
|
||||
Where("e.\"User_Id\" = ?", user_id).
|
||||
Scan(&doctor_id).Error
|
||||
Scan(®istrator_id).Error
|
||||
|
||||
if err != nil {
|
||||
event.Status = "failed"
|
||||
@@ -175,5 +175,5 @@ func GetIdByUserId(user_id *uint, event *pl.Event, dbx ...*gorm.DB) (*uint, erro
|
||||
}
|
||||
|
||||
pl.SetLogInfo(event, nil, "complete")
|
||||
return &doctor_id, nil
|
||||
return ®istrator_id, nil
|
||||
}
|
||||
+7
-7
@@ -1,7 +1,7 @@
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
import (
|
||||
e "simrs-vx/internal/domain/main-entities/registration"
|
||||
e "simrs-vx/internal/domain/main-entities/registrator"
|
||||
pl "simrs-vx/pkg/logger"
|
||||
pu "simrs-vx/pkg/use-case-helper"
|
||||
|
||||
@@ -23,7 +23,7 @@ func newMiddlewareRunner(event *pl.Event, tx *gorm.DB) *middlewareRunner {
|
||||
}
|
||||
|
||||
// ExecuteCreateMiddleware executes create middleware
|
||||
func (me *middlewareRunner) RunCreateMiddleware(middlewares []createMw, input *e.CreateDto, data *e.Registration) error {
|
||||
func (me *middlewareRunner) RunCreateMiddleware(middlewares []createMw, input *e.CreateDto, data *e.Registrator) error {
|
||||
for _, middleware := range middlewares {
|
||||
logData := pu.GetLogData(input, data)
|
||||
|
||||
@@ -38,7 +38,7 @@ func (me *middlewareRunner) RunCreateMiddleware(middlewares []createMw, input *e
|
||||
return nil
|
||||
}
|
||||
|
||||
func (me *middlewareRunner) RunReadListMiddleware(middlewares []readListMw, input *e.ReadListDto, data *e.Registration) error {
|
||||
func (me *middlewareRunner) RunReadListMiddleware(middlewares []readListMw, input *e.ReadListDto, data *e.Registrator) error {
|
||||
for _, middleware := range middlewares {
|
||||
logData := pu.GetLogData(input, data)
|
||||
|
||||
@@ -53,7 +53,7 @@ func (me *middlewareRunner) RunReadListMiddleware(middlewares []readListMw, inpu
|
||||
return nil
|
||||
}
|
||||
|
||||
func (me *middlewareRunner) RunReadDetailMiddleware(middlewares []readDetailMw, input *e.ReadDetailDto, data *e.Registration) error {
|
||||
func (me *middlewareRunner) RunReadDetailMiddleware(middlewares []readDetailMw, input *e.ReadDetailDto, data *e.Registrator) error {
|
||||
for _, middleware := range middlewares {
|
||||
logData := pu.GetLogData(input, data)
|
||||
|
||||
@@ -68,7 +68,7 @@ func (me *middlewareRunner) RunReadDetailMiddleware(middlewares []readDetailMw,
|
||||
return nil
|
||||
}
|
||||
|
||||
func (me *middlewareRunner) RunUpdateMiddleware(middlewares []readDetailMw, input *e.ReadDetailDto, data *e.Registration) error {
|
||||
func (me *middlewareRunner) RunUpdateMiddleware(middlewares []readDetailMw, input *e.ReadDetailDto, data *e.Registrator) error {
|
||||
for _, middleware := range middlewares {
|
||||
logData := pu.GetLogData(input, data)
|
||||
|
||||
@@ -83,7 +83,7 @@ func (me *middlewareRunner) RunUpdateMiddleware(middlewares []readDetailMw, inpu
|
||||
return nil
|
||||
}
|
||||
|
||||
func (me *middlewareRunner) RunDeleteMiddleware(middlewares []readDetailMw, input *e.ReadDetailDto, data *e.Registration) error {
|
||||
func (me *middlewareRunner) RunDeleteMiddleware(middlewares []readDetailMw, input *e.ReadDetailDto, data *e.Registrator) error {
|
||||
for _, middleware := range middlewares {
|
||||
logData := pu.GetLogData(input, data)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
// example of middleware
|
||||
// func init() {
|
||||
+5
-5
@@ -6,27 +6,27 @@ In this sample it also provides type and variable regarding the needs of the
|
||||
middleware to separate from main use-case which has the basic CRUD
|
||||
functionality. The purpose of this is to make the code more maintainable.
|
||||
*/
|
||||
package doctor
|
||||
package registrator
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
|
||||
e "simrs-vx/internal/domain/main-entities/registration"
|
||||
e "simrs-vx/internal/domain/main-entities/registrator"
|
||||
)
|
||||
|
||||
type createMw struct {
|
||||
Name string
|
||||
Func func(input *e.CreateDto, data *e.Registration, tx *gorm.DB) error
|
||||
Func func(input *e.CreateDto, data *e.Registrator, tx *gorm.DB) error
|
||||
}
|
||||
|
||||
type readListMw struct {
|
||||
Name string
|
||||
Func func(input *e.ReadListDto, data *e.Registration, tx *gorm.DB) error
|
||||
Func func(input *e.ReadListDto, data *e.Registrator, tx *gorm.DB) error
|
||||
}
|
||||
|
||||
type readDetailMw struct {
|
||||
Name string
|
||||
Func func(input *e.ReadDetailDto, data *e.Registration, tx *gorm.DB) error
|
||||
Func func(input *e.ReadDetailDto, data *e.Registrator, tx *gorm.DB) error
|
||||
}
|
||||
|
||||
type UpdateMw = readDetailMw
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
en "simrs-vx/internal/domain/main-entities/nurse"
|
||||
et "simrs-vx/internal/domain/main-entities/nutritionist"
|
||||
ep "simrs-vx/internal/domain/main-entities/pharmacist"
|
||||
er "simrs-vx/internal/domain/main-entities/registration"
|
||||
er "simrs-vx/internal/domain/main-entities/registrator"
|
||||
esi "simrs-vx/internal/domain/main-entities/specialist-intern"
|
||||
e "simrs-vx/internal/domain/main-entities/user"
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
upa "simrs-vx/internal/use-case/main-use-case/person-address"
|
||||
upc "simrs-vx/internal/use-case/main-use-case/person-contact"
|
||||
up "simrs-vx/internal/use-case/main-use-case/pharmacist"
|
||||
ur "simrs-vx/internal/use-case/main-use-case/registration"
|
||||
ur "simrs-vx/internal/use-case/main-use-case/registrator"
|
||||
usi "simrs-vx/internal/use-case/main-use-case/specialist-intern"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
Reference in New Issue
Block a user