package models import ( _ "image/gif" _ "image/jpeg" _ "image/png" "zhiyuan/pkg/db" "github.com/gin-gonic/gin" ) type UpgradeItem struct { ID int64 `json:"id" prop:"add:false"` PkgId int64 `json:"pkgid" type:"int" prop:"add" search:"="` Name string `json:"name" label:"名称" type:"string" prop:"edit" search:"like"` ControlPrice float64 `json:"control_price" label:"控价" type:"float" prop:"edit"` UpgradeControlPrice float64 `json:"upgrade_control_price" label:"升级控价" type:"float" prop:"edit"` Coefficient float64 `json:"coefficient" label:"免费系数" type:"float" prop:"edit"` LossCoefficient float64 `json:"loss_coefficient" label:"免费系数" type:"float" prop:"edit"` State int64 `json:"state" label:"状态" type:"int" prop:"add:false edit" default:"0" 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 (UpgradeItem) TableName() string { return "zy_upgrade_item" } func (model UpgradeItem) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool { return true } func (model UpgradeItem) ListAfter(c *gin.Context, data map[string]interface{}, list []map[string]interface{}) []map[string]interface{} { return list } func (UpgradeItem) OnePrivilege(c *gin.Context, id int64) bool { return true } func (UpgradeItem) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error { return nil } func (UpgradeItem) AddAfter(c *gin.Context, id int64, post map[string]interface{}, data map[string]interface{}) { } func (UpgradeItem) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error { return nil } func (UpgradeItem) DelPrivilege(c *gin.Context, id int64) error { return nil } func (UpgradeItem) Page() bool { return false } func (UpgradeItem) Count() bool { return true }