package dispatch import ( "zhiyuan/pkg/db" "github.com/gin-gonic/gin" ) type DispatchSiteItem struct { ID int64 `json:"id" prop:"add:false"` TableId int64 `json:"table_id" label:"表" type:"int" prop:"add edit" search:"="` Name string `json:"name" label:"项目名称" type:"string" prop:"add edit" search:"like"` Unit string `json:"unit" label:"单位" type:"string" prop:"edit"` Price float64 `json:"price" label:"单价" type:"float" prop:"edit" default:"0"` Num float64 `json:"num" label:"数量" type:"float" prop:"edit" default:"0"` Remark string `json:"remark" label:"备注" type:"string" prop:"edit"` 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 (DispatchSiteItem) TableName() string { return "zy_dispatch_site_item" } func (model DispatchSiteItem) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool { return true } func (DispatchSiteItem) OnePrivilege(c *gin.Context, id int64) bool { return true } func (DispatchSiteItem) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error { return nil } func (DispatchSiteItem) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error { return nil } func (DispatchSiteItem) DelPrivilege(c *gin.Context, id int64) error { return nil } func (DispatchSiteItem) Page() bool { return false } func (DispatchSiteItem) Count() bool { return true } func (model DispatchSiteItem) LeftJoin(data map[string]interface{}, s *db.Select) []db.JoinModel { return []db.JoinModel{} }