123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package rest
- import (
- "git.nspix.com/golang/micro/gateway/http"
- "gorm.io/gorm"
- )
- type (
- Model interface {
- ModuleName() string
- TableName() string
- Scenario() []string
- }
- ModelViewer interface {
- TableLabel() string
- }
- Migrating interface {
- Defaults() []MigrateValue
- }
- MigrateValue struct {
- Value interface{}
- Conditions interface{}
- }
- KvMapping interface {
- LabelField() string
- ValueField() string
- }
- mappingValue struct {
- Label string `json:"label"`
- Value string `json:"value"`
- }
- // FilterColumnInterface 过滤回调函数
- FilterColumnInterface interface {
- OnSearchColumn(ctx *http.Context, query *Query, schema *Schema) (err error)
- }
- // RequestHandleFunc 处理HTTP请求回调函数
- RequestHandleFunc func(ctx *http.Context, tx *gorm.DB, model interface{}) (err error)
- )
|