houses.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package houses
  2. import (
  3. "zhiyuan/pkg/db"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type Houses struct {
  7. ID int64 `json:"id" prop:"add:false"`
  8. Name string `json:"name" label:"楼盘名称" type:"string" prop:"add edit" search:"like"`
  9. Areacode string `json:"areacode" label:"区划代码" type:"string" prop:"edit" search:"rightlike"`
  10. Address string `json:"address" label:"楼盘地址" type:"string" prop:"edit" search:"like"`
  11. Shape string `json:"shape" label:"形状" type:"string" prop:"edit"`
  12. Lng string `json:"lng" label:"经度" type:"string" prop:"edit"`
  13. Lat string `json:"lat" label:"纬度" type:"string" prop:"edit"`
  14. Vertical string `json:"vertical" label:"俯视图" type:"string" prop:"edit"`
  15. Developer string `json:"developer" label:"开发商" type:"string" prop:"edit"`
  16. Property string `json:"property" label:"物业公司" type:"string" prop:"edit"`
  17. Buildings int64 `json:"buildings" label:"楼栋总数" type:"int" prop:"edit"`
  18. Rooms int64 `json:"rooms" label:"房屋户数" type:"int" prop:"edit"`
  19. DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
  20. CreatedAt int64 `json:"created_at" prop:"add:false select:false"`
  21. UpdatedAt int64 `json:"updated_at" prop:"add:false select:false"`
  22. db.BaseModel
  23. }
  24. func (Houses) TableName() string {
  25. return "zy_houses"
  26. }
  27. func (model Houses) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
  28. return true
  29. }
  30. func (Houses) OnePrivilege(c *gin.Context, id int64) bool {
  31. return true
  32. }
  33. func (Houses) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
  34. return nil
  35. }
  36. func (Houses) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
  37. return nil
  38. }
  39. func (Houses) DelPrivilege(c *gin.Context, id int64) error {
  40. return nil
  41. }
  42. func (Houses) Page() bool {
  43. return false
  44. }
  45. func (Houses) Count() bool {
  46. return true
  47. }