Files
simrsx-be/internal/use-case/simgos-sync-use-case/new/encounter/tycovar.go
T
2025-11-26 13:28:20 +07:00

52 lines
1.3 KiB
Go

/*
DESCRIPTION:
A sample, part of the package that contains type, constants, and/or variables.
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 encounter
import (
"gorm.io/gorm"
e "simrs-vx/internal/domain/main-entities/encounter"
)
type createMw struct {
Name string
Func func(input *e.CreateDto, data *e.Encounter, tx *gorm.DB) error
}
type readListMw struct {
Name string
Func func(input *e.ReadListDto, data *e.Encounter, tx *gorm.DB) error
}
type readDetailMw struct {
Name string
Func func(input *e.ReadDetailDto, data *e.Encounter, tx *gorm.DB) error
}
type UpdateMw = readDetailMw
type DeleteMw = readDetailMw
var createPreMw []createMw // preprocess middleware
var createPostMw []createMw // postprocess middleware
var readListPreMw []readListMw // ..
var readListPostMw []readListMw // ..
var readDetailPreMw []readDetailMw
var readDetailPostMw []readDetailMw
var updatePreMw []readDetailMw
var updatePostMw []readDetailMw
var deletePreMw []readDetailMw
var deletePostMw []readDetailMw
type DeathCauseSrc struct {
Id uint `json:"id"`
Code string `json:"code"`
Name string `json:"name"`
IndName string `json:"indName"`
}