package adime

import (
	"gorm.io/gorm"

	e "simrs-vx/internal/domain/main-entities/adime"
)

type createMw struct {
	Name string
	Func func(input *e.CreateDto, data *e.Adime, tx *gorm.DB) error
}

type readListMw struct {
	Name string
	Func func(input *e.ReadListDto, data *e.Adime, tx *gorm.DB) error
}

type readDetailMw struct {
	Name string
	Func func(input *e.ReadDetailDto, data *e.Adime, 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
