package final import ( "zhiyuan/pkg/db" "github.com/gin-gonic/gin" ) type Holidays struct { ID int64 `json:"id" prop:"add:false"` HolidayDate int64 `json:"holiday_date" label:"假日" type:"int" prop:"add edit" search:"="` db.BaseModel } func (Holidays) TableName() string { return "zy_holidays" } func (o Holidays) GetOne(where map[string]interface{}, fields []string, retVal interface{}) (*Holidays, error) { if retVal == nil { var matBidOrder *Holidays err := db.GetOne(o.TableName(), where, fields, &matBidOrder) return matBidOrder, err } else { err := db.GetOne(o.TableName(), where, fields, retVal) return nil, err } } func (o Holidays) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool { return true } func (Holidays) ListAfter(c *gin.Context, data map[string]interface{}, list []map[string]interface{}) []map[string]interface{} { return list } func (Holidays) OnePrivilege(c *gin.Context, id int64) bool { return true } func (Holidays) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error { return nil } func (Holidays) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error { return nil } func (Holidays) DelPrivilege(c *gin.Context, id int64) error { return nil } func (Holidays) Page() bool { return false } func (Holidays) Count() bool { return true } func (o Holidays) LeftJoin(data map[string]interface{}, s *db.Select) []db.JoinModel { return []db.JoinModel{} }