package geo import ( "database/sql" "zhiyuan/pkg/db" "github.com/gin-gonic/gin" ) type Area struct { Code string `json:"code" type:"string" search:"="` Name string `json:"name" type:"string" search:"="` CityCode string `json:"cityCode" type:"string" search:"="` ProvinceCode string `json:"provinceCode" type:"string" search:"="` db.BaseModel } func (Area) TableName() string { return "area" } func (Area) DB() *sql.DB { return db.GeoDB } func (Area) PrimaryField() string { return "code" } func (Area) CreatedField() string { return "" } func (Area) UpdatedField() string { return "" } func (Area) DeletedField() string { return "" } func (model Area) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool { return true } func (Area) OnePrivilege(c *gin.Context, id int64) bool { return true } func (Area) Page() bool { return false } func (Area) Count() bool { return true }