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