room.go 1.6 KB

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