水印
作者:
go项目
- trek/services/form-services/middlewares/entities/【实体名】/params.go
// 1. 实体的哪些字段要作为水印
var watermarkFieldNames = []string{
gen_ef.F_Project_billFullStatusObject,
gen_ef.F_Project_budgetStatus,
}
var (
// 2.
watermarkSettingParams = form_service_middlewares_common.WatermarkSettingMiddlewareCreatorParams{
Items: form_service_middlewares_common.DefaultWatermarkSettingItemsCreator(watermarkFieldNames...),
}
// 3.
billCommonRulesParams = form_service_middlewares_common.BillCommonRulesCreatorParams{
WatermarkSettingMiddlewareCreatorParams: &watermarkSettingParams,
}
)
- trek/services/form-services/middlewares/entities/【实体名】/index.go
func GetMiddlewareCreators() []form_context.FormMiddlewareCreator {
middlewareCreators := []form_context.FormMiddlewareCreator{
// 1.
form_service_middlewares_common.BillCommonRulesMiddlewareCreator(billCommonRulesParams),
}
}