12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 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
- }
|