12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package raffle
- import (
- "zhiyuan/pkg/db"
- "github.com/gin-gonic/gin"
- )
- type RaffleItem struct {
- ID int64 `json:"id" prop:"add:false"`
- RaffleId int64 `json:"raffle_id" type:"int" prop:"add" search:"="`
- Name string `json:"name" label:"奖品名称" type:"string" prop:"add edit" search:"like"`
- Picture string `json:"picture" label:"图片" type:"string" prop:"edit"`
- Winning int64 `json:"winning" label:"是否中奖" type:"int" prop:"edit" default:"0"`
- Weight int64 `json:"weight" label:"权重" type:"int" prop:"add edit" default:"0"`
- Limit int64 `json:"limit" label:"上限" type:"int" prop:"edit" default:"0"`
- OrderAt int64 `json:"order_at" prop:"add:false select:false"`
- DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
- CreatedAt int64 `json:"created_at" prop:"add:false select:false"`
- UpdatedAt int64 `json:"updated_at" prop:"add:false select:false"`
- db.BaseModel
- }
- func (RaffleItem) TableName() string {
- return "zy_raffle_item"
- }
- func (model RaffleItem) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
- return true
- }
- func (RaffleItem) OnePrivilege(c *gin.Context, id int64) bool {
- return true
- }
- func (RaffleItem) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (RaffleItem) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
- return nil
- }
- func (RaffleItem) DelPrivilege(c *gin.Context, id int64) error {
- return nil
- }
- func (RaffleItem) OrderField() string {
- return "order_at"
- }
- func (RaffleItem) Page() bool {
- return false
- }
- func (RaffleItem) Count() bool {
- return true
- }
|