floor.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package houses
  2. import (
  3. "zhiyuan/pkg/db"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type HousesFloor 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. Name string `json:"name" label:"楼层名称" type:"string" prop:"add 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. DeletedAt int64 `json:"deleted_at" prop:"add:false select:false"`
  15. CreatedAt int64 `json:"created_at" prop:"add:false select:false"`
  16. UpdatedAt int64 `json:"updated_at" prop:"add:false select:false"`
  17. db.BaseModel
  18. }
  19. func (HousesFloor) TableName() string {
  20. return "zy_houses_floor"
  21. }
  22. func (model HousesFloor) ListPrivilege(c *gin.Context, data map[string]interface{}, s *db.Select) bool {
  23. return true
  24. }
  25. func (HousesFloor) OnePrivilege(c *gin.Context, id int64) bool {
  26. return true
  27. }
  28. func (HousesFloor) AddPrivilege(c *gin.Context, data map[string]interface{}, post map[string]interface{}) error {
  29. return nil
  30. }
  31. func (HousesFloor) EditPrivilege(c *gin.Context, id int64, data map[string]interface{}, post map[string]interface{}) error {
  32. return nil
  33. }
  34. func (HousesFloor) DelPrivilege(c *gin.Context, id int64) error {
  35. return nil
  36. }
  37. func (HousesFloor) Page() bool {
  38. return false
  39. }
  40. func (HousesFloor) Count() bool {
  41. return true
  42. }