chore: 初始开源发布

iotlcm-openapi:对外 OpenAPI 网关(V3 接口 + 旧版兼容接口)。

- Go module:iotlcm-openapi → git.5iot.com/iotlcm-public/iotlcm-openapi(178 文件)
- 凭据与地址脱敏:JWT signingKey、MySQL DSN、Redis 口令、
  RabbitMQ DSN 全部改为 ${*} 占位;私网 IP → 文档地址段
- 7 处真实手机号 → 合法 11 位编造号
- 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名
- 移除内部资产:CI 触发器
- Dockerfile 改用公共基础镜像,移除 GOPRIVATE 内网设置
- README 重写(原为 GoFrame 模板占位文案),补 Apache-2.0 LICENSE,
  LF 行尾 + .gitattributes
This commit is contained in:
MiFaZhan
2026-10-23 14:15:47 +08:00
commit 88dfe5c640
482 changed files with 34475 additions and 0 deletions
+93
View File
@@ -0,0 +1,93 @@
package model
import "time"
// TrafficUsageBase 是日流量和月流量共用的业务字段。
// 这些字段会分别写入 TDengine 的普通列和标签列。
type TrafficUsageBase struct {
Iccid string
UsageMb float64
PackageCode string
}
// TrafficUsageDailyItem 表示某张卡某一天的流量用量。
// Date 会被归一化到当天 00:00:00 作为 TDengine 主时间戳。
type TrafficUsageDailyItem struct {
TrafficUsageBase
Date time.Time
}
// TrafficUsageMonthlyItem 表示某张卡某个月的流量用量。
// Month 会被归一化到当月 1 日 00:00:00 作为 TDengine 主时间戳。
type TrafficUsageMonthlyItem struct {
TrafficUsageBase
Month time.Time
}
// TrafficPoolUsageItem 表示某张流量池某一天的流量用量。
type TrafficPoolUsageItem struct {
FlowPoolCode string
UsageMb float64
Date time.Time
}
// TrafficPoolCardCountItem 表示某张流量池某一天的卡数。
type TrafficPoolCardCountItem struct {
FlowPoolCode string
CardCount int64
Date time.Time
}
// TrafficPoolCard 表示某张流量池某一天的一张卡。
type TrafficPoolCard struct {
Iccid string
FlowPoolCode string
}
// TrafficPoolUsageAggregate 表示某张流量池某一天的流量用量和卡数。
type TrafficPoolUsageAggregate struct {
FlowPoolCode string
UsageMb float64
RecordCount int64
}
// TrafficUsageQueryInput 是按 ICCID 和时间范围查询流量数据的入参。
type TrafficUsageQueryInput struct {
Iccid string
StartTime time.Time
EndTime time.Time
Page int
PageSize int
Asc bool
}
// TrafficUsageDeleteInput 是按 ICCID 和时间范围删除流量数据的入参。
// 删除必须带时间范围,避免误删整张子表数据。
type TrafficUsageDeleteInput struct {
Iccid string
StartTime time.Time
EndTime time.Time
}
// TrafficUsageDailyRecord 是日流量查询结果。
type TrafficUsageDailyRecord struct {
Ts time.Time `json:"ts"`
UsageMb float64 `json:"usageMb"`
PackageCode string `json:"packageCode"`
Iccid string `json:"iccid"`
}
// TrafficUsageMonthlyRecord 是月流量查询结果。
type TrafficUsageMonthlyRecord struct {
Ts time.Time `json:"ts"`
UsageMb float64 `json:"usageMb"`
PackageCode string `json:"packageCode"`
Iccid string `json:"iccid"`
}
// TopUsageCard 是流量使用排名前五的卡片。
type TopUsageCard struct {
Iccid string `json:"iccid"`
UsageMb float64 `json:"usageMb"`
StatDate string `json:"statDate"`
}