// Package house_community 定义楼盘/小区管理接口,路由前缀 /house。 package house_community import "github.com/gogf/gf/v2/frame/g" // CommunityItem 小区列表中的一行。 type CommunityItem struct { Id uint64 `json:"id"` Name string `json:"name"` Region string `json:"region"` BusinessDistrict string `json:"businessDistrict"` Address string `json:"address"` Lng float64 `json:"lng"` Lat float64 `json:"lat"` BuildYear int `json:"buildYear"` Households int `json:"households"` PlotRatio float64 `json:"plotRatio"` GreenRate float64 `json:"greenRate"` PropertyCompany string `json:"propertyCompany"` PropertyFee float64 `json:"propertyFee"` Developer string `json:"developer"` Source string `json:"source"` } // CommunityListReq 分页查询小区。 type CommunityListReq struct { g.Meta `path:"/house/community/list" method:"post" tags:"Admin/House/Community" summary:"小区列表"` Page int `json:"page" d:"1" v:"min:1"` Size int `json:"size" d:"10" v:"min:1|max:100"` Keyword string `json:"keyword"` // 匹配名称/地址 Region string `json:"region"` } // CommunityListRes 是 CommunityListReq 的响应。 type CommunityListRes struct { List []*CommunityItem `json:"list"` Total int `json:"total"` } // CommunityCreateReq 新增小区。 type CommunityCreateReq struct { g.Meta `path:"/house/community/create" method:"post" tags:"Admin/House/Community" summary:"新增小区"` Name string `json:"name" v:"required"` Region string `json:"region"` BusinessDistrict string `json:"businessDistrict"` Address string `json:"address"` Lng float64 `json:"lng"` Lat float64 `json:"lat"` BuildYear int `json:"buildYear"` Households int `json:"households"` PlotRatio float64 `json:"plotRatio"` GreenRate float64 `json:"greenRate"` PropertyCompany string `json:"propertyCompany"` PropertyFee float64 `json:"propertyFee"` Developer string `json:"developer"` Source string `json:"source"` } // CommunityCreateRes 是 CommunityCreateReq 的响应。 type CommunityCreateRes struct { Id uint64 `json:"id"` } // CommunityUpdateReq 更新小区。 type CommunityUpdateReq struct { g.Meta `path:"/house/community/update/{id}" method:"post" tags:"Admin/House/Community" summary:"更新小区"` Id uint64 `json:"id" in:"path" v:"required"` Name string `json:"name" v:"required"` Region string `json:"region"` BusinessDistrict string `json:"businessDistrict"` Address string `json:"address"` Lng float64 `json:"lng"` Lat float64 `json:"lat"` BuildYear int `json:"buildYear"` Households int `json:"households"` PlotRatio float64 `json:"plotRatio"` GreenRate float64 `json:"greenRate"` PropertyCompany string `json:"propertyCompany"` PropertyFee float64 `json:"propertyFee"` Developer string `json:"developer"` } // CommunityUpdateRes 是 CommunityUpdateReq 的响应。 type CommunityUpdateRes struct{} // CommunityDeleteReq 删除小区(软删除)。 type CommunityDeleteReq struct { g.Meta `path:"/house/community/delete/{id}" method:"post" tags:"Admin/House/Community" summary:"删除小区"` Id uint64 `json:"id" in:"path" v:"required"` } // CommunityDeleteRes 是 CommunityDeleteReq 的响应。 type CommunityDeleteRes struct{}