package dispatch import ( "zhiyuan/pkg/db" "github.com/gin-gonic/gin" ) type DispatchType struct { ID int64 `json:"id" prop:"add:false"` Name string `json:"name" label:"类别名称" type:"string" prop:"add edit" search:"like"` WorkTypeId int64 `json:"work_type_id" label:"工种" type:"int" prop:"add edit" search:"="` DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"` CreatedAt int64 `json:"created_at" prop:"add:false"` UpdatedAt int64 `json:"updated_at" prop:"add:false"` db.BaseModel } func (DispatchType) TableName() string { return "zy_dispatch_type" } func (model DispatchType) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool { return true } func (DispatchType) OnePrivilege(c *gin.Context, id int64) bool { return true } func (DispatchType) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error { return nil } func (DispatchType) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error { return nil } func (DispatchType) DelPrivilege(c *gin.Context, id int64) error { return nil } func (DispatchType) Page() bool { return false } func (DispatchType) Count() bool { return true } func (model DispatchType) LeftJoin(data map[string]interface{}, s *db.Select) []db.JoinModel { return []db.JoinModel{} }