service.xpcool.com/internal/model/dto/house.go
夏犀麟 4aca0c7f6f
Some checks failed
Build and Deploy (service.xpcool.com) / build-and-deploy (push) Failing after 5m7s
feat(house): 实现看房模块后端功能
- 新增 9 张房屋相关数据表(社区/楼宇/房源/价格快照/交易/设施/社区设施/学区/偏好)
- 添加菜单权限种子数据并绑定超级管理员角色
- 生成 DAO 层代码和实体对象
- 实现房屋模块 API 接口(社区/房源/看板)和控制器服务层
- 支持多平台软关联匹配、笋盘标记和低可信度标记功能
- 更新超级管理员账号为 xxcool/xxCool@2026
- 调整 RBAC 菜单结构,移除管理员管理功能,新增日志管理菜单
- 修复 RBAC 安全漏洞,确保禁用角色权限失效
- 重构认证模块,将登录相关接口迁移到统一包结构下
- 移除废弃的管理模块和工具类接口定义
- 为通用工具包添加中文注释和文档说明
2026-08-26 23:42:38 +08:00

113 lines
2.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Package dto 定义看房模块服务边界的输入/输出结构。
package dto
import "service.xpcool.com/internal/model/entity"
// HouseCommunityInput 小区创建/更新输入Id=0 表示创建)。
type HouseCommunityInput struct {
Id uint64
Name string
Region string
BusinessDistrict string
Address string
Source string
Lng float64
Lat float64
PlotRatio float64
GreenRate float64
PropertyFee float64
BuildYear int
Households int
PropertyCompany string
Developer string
}
// HouseListingInput 房源创建/更新输入Id=0 表示创建)。
type HouseListingInput struct {
Id uint64
CommunityId uint64
BuildingId uint64
MatchGroupId uint64
HouseNo string
Layout string
Orientation string
Decoration string
Source string
SourceHouseId string
SourceUrl string
Area float64
UsableArea float64
TotalPrice float64
UnitPrice float64
ListPrice float64
Floor int
TotalFloors int
OnMarketDays int
PriceChangeCount int
Status int
Confidence int
IsBargain int
}
// HouseListingFilter 房源列表统一筛选条件(管理列表与看板共用)。
type HouseListingFilter struct {
Page int
Size int
CommunityId uint64
Keyword string
Layout string
Region string
Source string
PriceMin float64
PriceMax float64
AreaMin float64
AreaMax float64
Status int
IsBargain int
Confidence int
}
// HouseListingVO 房源查询结果(内嵌实体 + 关联小区名)。
type HouseListingVO struct {
entity.HouseListing
CommunityName string `json:"communityName" orm:"community_name"`
}
// DashboardOverview 看板统计概览。
type DashboardOverview struct {
CommunityCount int
ListingCount int
BargainCount int
LowConfidence int
AvgUnitPrice float64
AvgTotalPrice float64
AvgListDays float64
}
// DashboardMapPoint 地图点位。
type DashboardMapPoint struct {
CommunityId uint64
Name string
Region string
Lng float64
Lat float64
AvgUnitPrice float64
ListingCount int
BargainCount int
}
// DashboardTrendPoint 价格趋势点。
type DashboardTrendPoint struct {
Date string
AvgListPrice float64
AvgDealPrice float64
}
// DashboardRegionAgg 区域聚合。
type DashboardRegionAgg struct {
Region string
AvgUnitPrice float64
ListingCount int
BargainCount int
}