area.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package houses
  2. import (
  3. "zhiyuan/pkg/db"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type HousesArea struct {
  7. ID int64 `json:"id" prop:"add:false"`
  8. HouseId int64 `json:"house_id" type:"int" prop:"add" search:"="`
  9. Name string `json:"name" label:"区域名称" type:"string" prop:"add edit" search:"like"`
  10. Shape string `json:"shape" label:"形状" type:"string" prop:"edit"`
  11. Lng string `json:"lng" label:"经度" type:"string" prop:"edit"`
  12. Lat string `json:"lat" label:"纬度" type:"string" prop:"edit"`
  13. DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
  14. CreatedAt int64 `json:"created_at" prop:"add:false select:false"`
  15. UpdatedAt int64 `json:"updated_at" prop:"add:false select:false"`
  16. db.BaseModel
  17. }
  18. func (HousesArea) TableName() string {
  19. return "zy_houses_area"
  20. }
  21. func (model HousesArea) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
  22. return true
  23. }
  24. func (HousesArea) OnePrivilege(c *gin.Context, id int64) bool {
  25. return true
  26. }
  27. func (HousesArea) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
  28. return nil
  29. }
  30. func (HousesArea) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
  31. return nil
  32. }
  33. func (HousesArea) DelPrivilege(c *gin.Context, id int64) error {
  34. return nil
  35. }
  36. func (HousesArea) Page() bool {
  37. return false
  38. }
  39. func (HousesArea) Count() bool {
  40. return true
  41. }