chore: 初始开源发布

iotlcm-upstream-chan:运营商上游通道适配服务(统一 /sim/* 协议)。

- 内联原私有依赖:yunze-public → internal/pub/(10 包 18 文件),
  yunze-pb/pb → internal/pb/(9 文件);Consul 注册改用官方
  gogf/gf/contrib/registry/consul/v2(API 兼容)
- Go module:yz-svr → git.5iot.com/iotlcm-public/iotlcm-upstream-chan
- 修复 mingqian 包测试:实现重构后 `adapter.operations` 字段已移除,
  测试断言按当前实现语义重写(不改产品行为)
- 凭据与内部标识脱敏:MySQL/Redis/Consul 凭据、私网与生产 IP、
  内网域名、真实手机号、注释里的真实 token/transid
- 移除内部资产:CI 触发器、生产通道种子 SQL、真实凭据测试资源文档
- Dockerfile 改用公共基础镜像,移除写死的 registry 凭据
- 补 Apache-2.0 LICENSE,重写 README,LF 行尾 + .gitattributes
This commit is contained in:
MiFaZhan
2026-10-22 15:42:29 +08:00
commit 96b1edff45
191 changed files with 30805 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
package model
import "errors"
var ErrChannelNotAccessible = errors.New("channel is not accessible")
const (
ChannelTestInputModeComplete = "complete"
ChannelTestInputModeSingle = "single"
ChannelTestInputModeDirectSingle = "direct_single"
)
// ChannelTestInput is the service-to-service request for a read-only channel
// probe. TenantID is populated by admin-svr from the authenticated context.
type ChannelTestInput struct {
ChannelID int64 `json:"channelId"`
TenantID string `json:"tenantId"`
InputMode string `json:"inputMode"`
CardValueType string `json:"cardValueType"`
CardValue string `json:"cardValue"`
ICCID string `json:"iccid"`
IMSI string `json:"imsi"`
MSISDN string `json:"msisdn"`
Items []string `json:"items"`
}
type ChannelTestOutput struct {
Items []*ChannelTestItem `json:"items"`
}
type ChannelTestItem struct {
Key string `json:"key"`
Name string `json:"name"`
Status string `json:"status"`
DurationMs int64 `json:"durationMs"`
Message string `json:"message,omitempty"`
Data any `json:"data,omitempty"`
ErrorCode int `json:"errorCode,omitempty"`
}
// ChannelTestOperationNames is deliberately a closed read-only set. Change
// operations are not represented here and cannot be requested over the
// internal endpoint.
var ChannelTestOperationNames = map[string]string{
"simBasicInfo": "基础信息",
"simSession": "实时会话",
"simStatus": "卡状态",
"simStopReason": "停机原因",
"simFrozenState": "冻结状态",
"simCardBindStatus": "机卡绑定",
"simDeviceStatus": "设备状态",
"simRegionLimitStatus": "区域限制",
"simImei": "IMEI",
"simDataUsage": "实时流量",
"simDataUsageMonthly": "月流量",
"simDataUsageDaily": "日流量",
"simApnInfo": "APN信息",
}
+27
View File
@@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TApi is the golang structure of table t_api for DAO operations like Where/Data.
type TApi struct {
g.Meta `orm:"table:t_api, do:true"`
Id any // ID
AppKey any // APPKey
AppSecret any // APPSecret
RateLimitPeriod any // 限流周期(秒,0:不限流)
RateLimitCount any // 限流次数
DeptId any // 所属机构
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+35
View File
@@ -0,0 +1,35 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TCustomer is the golang structure of table t_customer for DAO operations like Where/Data.
type TCustomer struct {
g.Meta `orm:"table:t_customer, do:true"`
Id any // ID
CKey any // 客户编号
CType any // 客户类型(0:企业,1:个人)
CName any // 客户名称
CShortName any // 客户简称
ContactUserName any // 联系人
ContactPhone any // 联系电话
LicenseNumber any // 统一社会信用代码
RegionCode any // 行政区域代码
Address any // 地址
DepositAmount any // 预存金额
CreditAmountTotal any // 已授信额度
CreditAmountUsed any // 已使用授信额度
DeptId any // 所属机构
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+34
View File
@@ -0,0 +1,34 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPackage is the golang structure of table t_sim_agent_package for DAO operations like Where/Data.
type TSimAgentPackage struct {
g.Meta `orm:"table:t_sim_agent_package, do:true"`
Id any // ID
PackageKey any // 套餐分类编码
PackageName any // 套餐分类名称
ParentPackageKey any // 上级套餐分类编码
PackageStatus any // 是否启用(0:未启用,1启用)
BillingMethod any // 计费方式(0:月,1:季,2:年)
ChannelPrice any // 渠道价格
MonthlyFee any // 月租费
PackageDataMb any // 套餐流量(MB)
PackageDataGb any // 套餐流量(GB)
ValidityPeriod any // 有效期
Description any // 描述信息
OrderNum any // 排序
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+29
View File
@@ -0,0 +1,29 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPacket is the golang structure of table t_sim_agent_packet for DAO operations like Where/Data.
type TSimAgentPacket struct {
g.Meta `orm:"table:t_sim_agent_packet, do:true"`
Id any // ID
PackageKey any // 套餐分类编码
PacketKey any // 套餐编码
PacketName any // 套餐名称
ValidityPeriod any // 套餐有效期(月份)
PacketStatus any // 是否启用(0:未启用,1启用)
DiscountPercent any // 折扣率(百分比)
Description any // 描述信息
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+73
View File
@@ -0,0 +1,73 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimCardInfo is the golang structure of table t_sim_card_info for DAO operations like Where/Data.
type TSimCardInfo struct {
g.Meta `orm:"table:t_sim_card_info, do:true"`
Id any // ID
Msisdn any // SIM号码
Iccid any // SIM卡号
Imsi any // SIM识别码
Imei any // IMEI
OpenDate *gtime.Time // 开卡日期(运营商)
ActivateDate *gtime.Time // 激活时间(运营商)
AllocationBatch any // 划拨批次
AllocationDate *gtime.Time // 划拨日期
ChanKey any // 通道编号
IsPool any // 是否流量池(0:否,1:是)
PoolKey any // 流量池编号
BatchKey any // 入库批次
BatchDate *gtime.Time // 入库日期
PackageKey any // 套餐分类编码
CurrPacketKey any // 当前套餐编码
AllowPacketChange any // 是否允许更改套餐(0:否 1:是)
CardStatus any // 卡状态
ValidityPeriod any // 有效期(月份)
ExpiryDate *gtime.Time // 套餐到期日期
UpstreamExpiryDate *gtime.Time // 上游到期时间(运营商)
IpType any // IP版本(人工录入)
NetModel any // 网络模式(人工录入)
RegionCode any // 行政区域代码(省市)
HasOffNet any // 是否开启达量断网
OffNetQuota any // 达量断网阈值(MB)
OffNetExpiryDate *gtime.Time // 达量断网过期时间
AgentShowField any // 客户展示字段设置
AgentShowValue any // 客户展示字段数据
HasTestPeriod any // 是否有测试期(0:无,1:有)
TestPeriod any // 测试期(天)
TestPeriodExpiryDate *gtime.Time // 测试期过期日期
HasSilentPeriod any // 是否有沉默期(0:无,1:有)
SilentPeriod any // 沉默期(月)
SilentPeriodExpiryDate *gtime.Time // 沉默期过期日期
HasAdditional any // 是否有附加费用(0:无 1:有)
AdditionalMultiplier any // 附加费用倍数
AdditionalAmount any // 附加金额
DataService any // 数据服务(0:关闭 1:开启)
DataTotalAmount any // 套餐流量(MB)
DataUseAmount any // 已用流量(MB)
SmsService any // 短信服务(0:关闭 1:开启)
SmsTotalAmount any // 套餐短信数量
SmsUseAmount any // 已用短信数量
VoiceService any // 语音服务(0:关闭 1:开启)
VoiceTotalAmount any // 套餐通话分钟数
VoiceUseAmount any // 已用通话分钟数
IntlRoamingService any // 国际漫游服务(0:关闭 1:开启)
IntlRoamingTotalAmount any // 套餐国际漫游流量(MB)
IntlRoamingUseAmount any // 已用国际漫游流量(MB)
Description any // 描述信息
DeptId any // 所属机构
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
@@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannelTemplate is the golang structure of table t_sim_channel_template for DAO operations like Where/Data.
type TSimChannelTemplate struct {
g.Meta `orm:"table:t_sim_channel_template, do:true"`
Id any // ID
TempKey any // 模板标识
TempName any // 模板名称
TempModel any // 模板模型
TempConfig any // 模板配置
TempStatus any // 模板状态(0未启用,1启用)
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+35
View File
@@ -0,0 +1,35 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package do
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannels is the golang structure of table t_sim_channels for DAO operations like Where/Data.
type TSimChannels struct {
g.Meta `orm:"table:t_sim_channels, do:true"`
Id any // ID
TempKey any // 模板标识
ChanKey any // 通道编号
ChanName any // 通道名称
ChanConfig any // 通道配置
ChanStatus any // 通道状态(0未启用,1启用)
ChanAlias any // 通道别名
RegionCode any // 通道行政区域代码(省市)
AppKey any // 应用标识
AppSecret any // 应用密钥
AccessToken any // 接口调用凭证
AccessTokenCreated *gtime.Time // 凭证申请时间
AccessTokenExpire *gtime.Time // 凭证过期时间
RefreshToken any // 刷新凭证
TenantId any // 租户ID
CreatedDept any // 创建部门
CreatedBy any // 创建者
CreatedAt *gtime.Time // 创建时间
UpdatedBy any // 更新者
UpdatedAt *gtime.Time // 更新时间
}
+25
View File
@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TApi is the golang structure for table t_api.
type TApi struct {
Id int64 `json:"id" orm:"id" description:"ID"`
AppKey string `json:"appKey" orm:"app_key" description:"APPKey"`
AppSecret string `json:"appSecret" orm:"app_secret" description:"APPSecret"`
RateLimitPeriod int `json:"rateLimitPeriod" orm:"rate_limit_period" description:"限流周期(秒,0:不限流)"`
RateLimitCount int `json:"rateLimitCount" orm:"rate_limit_count" description:"限流次数"`
DeptId int64 `json:"deptId" orm:"dept_id" description:"所属机构"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+33
View File
@@ -0,0 +1,33 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TCustomer is the golang structure for table t_customer.
type TCustomer struct {
Id int64 `json:"id" orm:"id" description:"ID"`
CKey string `json:"cKey" orm:"c_key" description:"客户编号"`
CType int `json:"cType" orm:"c_type" description:"客户类型(0:企业,1:个人)"`
CName string `json:"cName" orm:"c_name" description:"客户名称"`
CShortName string `json:"cShortName" orm:"c_short_name" description:"客户简称"`
ContactUserName string `json:"contactUserName" orm:"contact_user_name" description:"联系人"`
ContactPhone string `json:"contactPhone" orm:"contact_phone" description:"联系电话"`
LicenseNumber string `json:"licenseNumber" orm:"license_number" description:"统一社会信用代码"`
RegionCode string `json:"regionCode" orm:"region_code" description:"行政区域代码"`
Address string `json:"address" orm:"address" description:"地址"`
DepositAmount float64 `json:"depositAmount" orm:"deposit_amount" description:"预存金额"`
CreditAmountTotal float64 `json:"creditAmountTotal" orm:"credit_amount_total" description:"已授信额度"`
CreditAmountUsed float64 `json:"creditAmountUsed" orm:"credit_amount_used" description:"已使用授信额度"`
DeptId int64 `json:"deptId" orm:"dept_id" description:"所属机构"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
@@ -0,0 +1,32 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPackage is the golang structure for table t_sim_agent_package.
type TSimAgentPackage struct {
Id int64 `json:"id" orm:"id" description:"ID"`
PackageKey string `json:"packageKey" orm:"package_key" description:"套餐分类编码"`
PackageName string `json:"packageName" orm:"package_name" description:"套餐分类名称"`
ParentPackageKey string `json:"parentPackageKey" orm:"parent_package_key" description:"上级套餐分类编码"`
PackageStatus int `json:"packageStatus" orm:"package_status" description:"是否启用(0:未启用,1启用)"`
BillingMethod int `json:"billingMethod" orm:"billing_method" description:"计费方式(0:月,1:季,2:年)"`
ChannelPrice float64 `json:"channelPrice" orm:"channel_price" description:"渠道价格"`
MonthlyFee float64 `json:"monthlyFee" orm:"monthly_fee" description:"月租费"`
PackageDataMb float64 `json:"packageDataMb" orm:"package_data_mb" description:"套餐流量(MB)"`
PackageDataGb float64 `json:"packageDataGb" orm:"package_data_gb" description:"套餐流量(GB)"`
ValidityPeriod string `json:"validityPeriod" orm:"validity_period" description:"有效期"`
Description string `json:"description" orm:"description" description:"描述信息"`
OrderNum int `json:"orderNum" orm:"order_num" description:"排序"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
@@ -0,0 +1,27 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimAgentPacket is the golang structure for table t_sim_agent_packet.
type TSimAgentPacket struct {
Id int64 `json:"id" orm:"id" description:"ID"`
PackageKey string `json:"packageKey" orm:"package_key" description:"套餐分类编码"`
PacketKey string `json:"packetKey" orm:"packet_key" description:"套餐编码"`
PacketName string `json:"packetName" orm:"packet_name" description:"套餐名称"`
ValidityPeriod int `json:"validityPeriod" orm:"validity_period" description:"套餐有效期(月份)"`
PacketStatus int `json:"packetStatus" orm:"packet_status" description:"是否启用(0:未启用,1启用)"`
DiscountPercent int `json:"discountPercent" orm:"discount_percent" description:"折扣率(百分比)"`
Description string `json:"description" orm:"description" description:"描述信息"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+71
View File
@@ -0,0 +1,71 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimCardInfo is the golang structure for table t_sim_card_info.
type TSimCardInfo struct {
Id int64 `json:"id" orm:"id" description:"ID"`
Msisdn string `json:"msisdn" orm:"msisdn" description:"SIM号码"`
Iccid string `json:"iccid" orm:"iccid" description:"SIM卡号"`
Imsi string `json:"imsi" orm:"imsi" description:"SIM识别码"`
Imei string `json:"imei" orm:"imei" description:"IMEI"`
OpenDate *gtime.Time `json:"openDate" orm:"open_date" description:"开卡日期(运营商)"`
ActivateDate *gtime.Time `json:"activateDate" orm:"activate_date" description:"激活时间(运营商)"`
AllocationBatch string `json:"allocationBatch" orm:"allocation_batch" description:"划拨批次"`
AllocationDate *gtime.Time `json:"allocationDate" orm:"allocation_date" description:"划拨日期"`
ChanKey string `json:"chanKey" orm:"chan_key" description:"通道编号"`
IsPool int `json:"isPool" orm:"is_pool" description:"是否流量池(0:否,1:是)"`
PoolKey string `json:"poolKey" orm:"pool_key" description:"流量池编号"`
BatchKey string `json:"batchKey" orm:"batch_key" description:"入库批次"`
BatchDate *gtime.Time `json:"batchDate" orm:"batch_date" description:"入库日期"`
PackageKey string `json:"packageKey" orm:"package_key" description:"套餐分类编码"`
CurrPacketKey string `json:"currPacketKey" orm:"curr_packet_key" description:"当前套餐编码"`
AllowPacketChange int `json:"allowPacketChange" orm:"allow_packet_change" description:"是否允许更改套餐(0:否 1:是)"`
CardStatus int `json:"cardStatus" orm:"card_status" description:"卡状态"`
ValidityPeriod int `json:"validityPeriod" orm:"validity_period" description:"有效期(月份)"`
ExpiryDate *gtime.Time `json:"expiryDate" orm:"expiry_date" description:"套餐到期日期"`
UpstreamExpiryDate *gtime.Time `json:"upstreamExpiryDate" orm:"upstream_expiry_date" description:"上游到期时间(运营商)"`
IpType string `json:"ipType" orm:"ip_type" description:"IP版本(人工录入)"`
NetModel string `json:"netModel" orm:"net_model" description:"网络模式(人工录入)"`
RegionCode string `json:"regionCode" orm:"region_code" description:"行政区域代码(省市)"`
HasOffNet int `json:"hasOffNet" orm:"has_off_net" description:"是否开启达量断网"`
OffNetQuota float64 `json:"offNetQuota" orm:"off_net_quota" description:"达量断网阈值(MB)"`
OffNetExpiryDate *gtime.Time `json:"offNetExpiryDate" orm:"off_net_expiry_date" description:"达量断网过期时间"`
AgentShowField string `json:"agentShowField" orm:"agent_show_field" description:"客户展示字段设置"`
AgentShowValue string `json:"agentShowValue" orm:"agent_show_value" description:"客户展示字段数据"`
HasTestPeriod int `json:"hasTestPeriod" orm:"has_test_period" description:"是否有测试期(0:无,1:有)"`
TestPeriod int `json:"testPeriod" orm:"test_period" description:"测试期(天)"`
TestPeriodExpiryDate *gtime.Time `json:"testPeriodExpiryDate" orm:"test_period_expiry_date" description:"测试期过期日期"`
HasSilentPeriod int `json:"hasSilentPeriod" orm:"has_silent_period" description:"是否有沉默期(0:无,1:有)"`
SilentPeriod int `json:"silentPeriod" orm:"silent_period" description:"沉默期(月)"`
SilentPeriodExpiryDate *gtime.Time `json:"silentPeriodExpiryDate" orm:"silent_period_expiry_date" description:"沉默期过期日期"`
HasAdditional int `json:"hasAdditional" orm:"has_additional" description:"是否有附加费用(0:无 1:有)"`
AdditionalMultiplier float64 `json:"additionalMultiplier" orm:"additional_multiplier" description:"附加费用倍数"`
AdditionalAmount float64 `json:"additionalAmount" orm:"additional_amount" description:"附加金额"`
DataService int `json:"dataService" orm:"data_service" description:"数据服务(0:关闭 1:开启)"`
DataTotalAmount float64 `json:"dataTotalAmount" orm:"data_total_amount" description:"套餐流量(MB)"`
DataUseAmount float64 `json:"dataUseAmount" orm:"data_use_amount" description:"已用流量(MB)"`
SmsService int `json:"smsService" orm:"sms_service" description:"短信服务(0:关闭 1:开启)"`
SmsTotalAmount float64 `json:"smsTotalAmount" orm:"sms_total_amount" description:"套餐短信数量"`
SmsUseAmount float64 `json:"smsUseAmount" orm:"sms_use_amount" description:"已用短信数量"`
VoiceService int `json:"voiceService" orm:"voice_service" description:"语音服务(0:关闭 1:开启)"`
VoiceTotalAmount float64 `json:"voiceTotalAmount" orm:"voice_total_amount" description:"套餐通话分钟数"`
VoiceUseAmount float64 `json:"voiceUseAmount" orm:"voice_use_amount" description:"已用通话分钟数"`
IntlRoamingService int `json:"intlRoamingService" orm:"intl_roaming_service" description:"国际漫游服务(0:关闭 1:开启)"`
IntlRoamingTotalAmount float64 `json:"intlRoamingTotalAmount" orm:"intl_roaming_total_amount" description:"套餐国际漫游流量(MB)"`
IntlRoamingUseAmount float64 `json:"intlRoamingUseAmount" orm:"intl_roaming_use_amount" description:"已用国际漫游流量(MB)"`
Description string `json:"description" orm:"description" description:"描述信息"`
DeptId int64 `json:"deptId" orm:"dept_id" description:"所属机构"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
@@ -0,0 +1,25 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannelTemplate is the golang structure for table t_sim_channel_template.
type TSimChannelTemplate struct {
Id int64 `json:"id" orm:"id" description:"ID"`
TempKey string `json:"tempKey" orm:"temp_key" description:"模板标识"`
TempName string `json:"tempName" orm:"temp_name" description:"模板名称"`
TempModel string `json:"tempModel" orm:"temp_model" description:"模板模型"`
TempConfig string `json:"tempConfig" orm:"temp_config" description:"模板配置"`
TempStatus int `json:"tempStatus" orm:"temp_status" description:"模板状态(0未启用,1启用)"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+33
View File
@@ -0,0 +1,33 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package entity
import (
"github.com/gogf/gf/v2/os/gtime"
)
// TSimChannels is the golang structure for table t_sim_channels.
type TSimChannels struct {
Id int64 `json:"id" orm:"id" description:"ID"`
TempKey string `json:"tempKey" orm:"temp_key" description:"模板标识"`
ChanKey string `json:"chanKey" orm:"chan_key" description:"通道编号"`
ChanName string `json:"chanName" orm:"chan_name" description:"通道名称"`
ChanConfig string `json:"chanConfig" orm:"chan_config" description:"通道配置"`
ChanStatus int `json:"chanStatus" orm:"chan_status" description:"通道状态(0未启用,1启用)"`
ChanAlias string `json:"chanAlias" orm:"chan_alias" description:"通道别名"`
RegionCode string `json:"regionCode" orm:"region_code" description:"通道行政区域代码(省市)"`
AppKey string `json:"appKey" orm:"app_key" description:"应用标识"`
AppSecret string `json:"appSecret" orm:"app_secret" description:"应用密钥"`
AccessToken string `json:"accessToken" orm:"access_token" description:"接口调用凭证"`
AccessTokenCreated *gtime.Time `json:"accessTokenCreated" orm:"access_token_created" description:"凭证申请时间"`
AccessTokenExpire *gtime.Time `json:"accessTokenExpire" orm:"access_token_expire" description:"凭证过期时间"`
RefreshToken string `json:"refreshToken" orm:"refresh_token" description:"刷新凭证"`
TenantId string `json:"tenantId" orm:"tenant_id" description:"租户ID"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" description:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" description:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" description:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"`
}
+13
View File
@@ -0,0 +1,13 @@
package model
// RechargeCardInfo 腾宇 findCard 卡信息
type RechargeCardInfo struct {
RealName int `json:"w_real_name"`
CardNo string `json:"c_no"`
StatusShowID int `json:"status_show_id"`
TotalFlow float64 `json:"c_total"`
UsedFlow float64 `json:"c_used"`
LeftFlow float64 `json:"c_left"`
ExpireTime string `json:"prodinstexp_time"`
ActivateDate string `json:"activate_date"`
}
+68
View File
@@ -0,0 +1,68 @@
package model
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-upstream-chan/internal/model/entity"
"github.com/gogf/gf/v2/os/gtime"
)
type SimChannelConfigItemCache struct {
Template *entity.TSimChannelTemplate
Channel *entity.TSimChannels
IsNormal *int // global_yes_or_no: 0=yes, 1=no; NULL is not eligible.
Version string
}
// CanCreateInstance gates creation and replacement, not use of an existing instance.
func (c *SimChannelConfigItemCache) CanCreateInstance() bool {
return c != nil && c.Channel != nil && c.IsNormal != nil && *c.IsNormal == 0
}
type SimCardTempI interface {
NewTemp(ctx context.Context, channelConfig *SimChannelConfigItemCache) SimCardChannelI
}
// SimCardModelFactory creates a channel implementation from a template and
// channel configuration when no concrete temp_key registration exists.
type SimCardModelFactory func(context.Context, *SimChannelConfigItemCache) SimCardChannelI
// 接口定义
type SimCardChannelI interface {
QuerySimBasicInfo(ctx context.Context, input *SimBasicInfoInput) (SimBasicInfoOutput, error)
QuerySimSession(ctx context.Context, input *SimSessionInput) (SimSessionOutput, error)
QuerySimCardStatus(ctx context.Context, input *SimCardStatusInput) (SimCardStatusOutput, error)
QuerySimStopReason(ctx context.Context, input *SimStopReasonInput) (SimStopReasonOutput, error)
QuerySimFrozenState(ctx context.Context, input *SimFrozenStateInput) (SimFrozenStateOutput, error)
QuerySimCardBindStatus(ctx context.Context, input *SimCardBindStatusInput) (SimCardBindStatusOutput, error)
QuerySimDeviceStatus(ctx context.Context, input *SimDeviceStatusInput) (SimDeviceStatusOutput, error)
QuerySimRegionLimitStatus(ctx context.Context, input *SimRegionLimitStatusInput) (SimRegionLimitStatusOutput, error)
QuerySimImei(ctx context.Context, input *SimImeiInput) (SimImeiOutput, error)
QuerySimDataUsage(ctx context.Context, input *SimDataUsageInput) (SimDataUsageOutput, error)
QuerySimDataDiagnosis(ctx context.Context, input *SimDataDiagnosisInput) (SimDataDiagnosisOutput, error)
QuerySimDataUsageMonthly(ctx context.Context, input *SimDataUsageMonthlyInput) (SimDataUsageMonthlyOutput, error)
QuerySimDataUsageDaily(ctx context.Context, input *SimDataUsageDailyInput) (SimDataUsageDailyOutput, error)
QuerySimApnInfo(ctx context.Context, input *SimApnInfoInput) (SimApnInfoOutput, error)
ChangeSimStatus(ctx context.Context, input *SimCardStatusChangeInput) (SimCardStatusChangeOutput, error)
ChangeSimApnFunction(ctx context.Context, input *SimCardOperateChangeApnInput) (SimCardOperateChangeApnOutput, error)
}
type SimCardBatchQueryI interface {
QuerySimCardStatusBatch(ctx context.Context, input *SimCardStatusInput) (SimCardStatusOutput, error)
QuerySimDataUsageMonthlyBatch(ctx context.Context, input *SimDataUsageMonthlyInput) (SimDataUsageMonthlyOutput, error)
QuerySimDataUsageDailyBatch(ctx context.Context, input *SimDataUsageDailyInput) (SimDataUsageDailyOutput, error)
}
type SimCardChannelCache struct {
Instance SimCardChannelI
Version string
}
type UpdateAccessTokenInput struct {
ChanKey string
AccessToken string
AccessTokenCreated *gtime.Time
AccessTokenExpire *gtime.Time
RefreshToken string
RefreshTokenExpire *gtime.Time
}
+309
View File
@@ -0,0 +1,309 @@
package model
// 物联网卡标识
type SimKey struct {
// ChanKey is required for the asynchronous full-sync caller. Supplying it
// lets Chan route directly without looking the channel up through Proxy.
ChanKey string `json:"chanKey" dc:"通道标识"`
ICCID string `json:"iccid" dc:"联网卡集成电路卡识别码20位"`
IMSI string `json:"imsi" dc:"国际移动用户识别码"`
MSISDN string `json:"msisdn" dc:"移动用户识别码"`
}
// 物联网卡基础请求参数
type SimBaseReq[T any] struct {
SimKeys []*SimKey `json:"simKeys" dc:"SIM卡标识列表"`
ReqData T `json:"reqData" dc:"请求数据"`
}
// 物联网卡基础响应参数
type SimBaseRes[T any] struct {
Code int `json:"code" dc:"状态码"`
Message string `json:"message" dc:"消息"`
Cached bool `json:"cached,omitempty" dc:"是否来自缓存"`
UpdatedAt string `json:"updatedAt,omitempty" dc:"缓存更新时间"`
// ErrCode carries the raw carrier error code (for example telecom S00004)
// so downstream consumers can classify errors without parsing Message.
ErrCode string `json:"errCode" dc:"运营商原始错误码"`
SimKey *SimKey `json:"simKey" dc:"SIM卡标识"`
ResData T `json:"resData" dc:"响应数据"`
}
// 查询请求参数 空结构
type SimInputReqNullDate struct{}
// 物联网卡基本信息查询
type SimBasicInfoInput = SimBaseReq[SimInputReqNullDate]
// 物联网卡基本信息查询 响应参数
type SimBasicInfoOutput = []*SimBaseRes[SimBasicInfoItem]
// 物联网卡基本信息查询 响应参数 基本信息项
type SimBasicInfoItem struct {
ICCID string `json:"iccid" dc:"联网卡集成电路卡识别码"`
IMSI string `json:"imsi" dc:"国际移动用户识别码"`
MSISDN string `json:"msisdn" dc:"接入号码"`
ActiveDate string `json:"activeDate" dc:"激活时间"`
OpenDate string `json:"openDate" dc:"开卡时间"`
Remark string `json:"remark" dc:"备注"`
SimStatus string `json:"simStatus" dc:"SIM卡状态"`
StopTypeList []string `json:"stopTypeList" dc:"停机类型列表"`
MainOfferName string `json:"mainOfferName" dc:"主套餐名称"`
CardBindingType string `json:"cardBindingType" dc:"机卡绑定类型"`
IsDirectVisit string `json:"isDirectVisit" dc:"是否定向访问"`
IsHumanLimit string `json:"isHumanLimit" dc:"是否有人联网限制"`
VpdnGreDoamin string `json:"vpdnGreDoamin" dc:"VPDN(GRE)功能产品域名"`
VpdnL2tpDoamin string `json:"vpdnL2tpDoamin" dc:"VPDN(L2TP)功能产品域名"`
AreaLimitType string `json:"areaLimitType" dc:"区域限制类型"`
AreaLimitInfo string `json:"areaLimitInfo" dc:"区域限制信息"`
}
// 物联网卡在线信息实时查询 请求参数
type SimSessionInput = SimBaseReq[SimInputReqNullDate]
// 物联网卡在线信息实时查询 响应参数
type SimSessionOutput = []*SimBaseRes[SimSessionItem]
// 物联网卡在线信息实时查询 响应参数 会话项
type SimSessionItem struct {
ApnId string `json:"apnId" dc:"APN ID"`
Imei string `json:"imei" dc:"实时IMEI"`
Rat string `json:"rat" dc:"接入方式"`
Ipv4 string `json:"ipv4" dc:"IPV4"`
Ipv6 string `json:"ipv6" dc:"IPV6"`
Ipv6Prefix string `json:"ipv6Prefix" dc:"IPV6前缀"`
Status string `json:"status" dc:"会话在线状态(0:在线 -1:不在线 -2:未查到会话)"`
CreateTime string `json:"createTime" dc:"创建时间"`
}
// 物联网卡停机原因查询 请求参数
type SimStopReasonInput = SimBaseReq[SimInputReqNullDate]
// 物联网卡停机原因查询 响应参数
type SimStopReasonOutput = []*SimBaseRes[SimStopReasonItem]
// 物联网卡停机原因查询 响应参数 停机原因项
type SimStopReasonItem struct {
StopReason string `json:"stopReason" dc:"停机原因"`
PlatformType string `json:"platformType" dc:"平台类型"`
}
// 物联网卡冻结状态查询 请求参数
type SimFrozenStateInput = SimBaseReq[SimInputReqNullDate]
// 物联网卡冻结状态查询 响应参数
type SimFrozenStateOutput = []*SimBaseRes[SimFrozenStateItem]
// 物联网卡冻结状态查询 响应参数 冻结状态项
type SimFrozenStateItem struct {
FrozenStatus string `json:"frozenStatus" dc:"冻结状态"`
FrozenReason string `json:"frozenReason" dc:"冻结原因"`
OperTime string `json:"operTime" dc:"操作时间"`
}
// 物联网卡卡状态查询 请求参数
type SimCardStatusInput = SimBaseReq[SimInputReqNullDate]
// 物联网卡卡状态查询 响应参数
type SimCardStatusOutput = []*SimBaseRes[SimCardStatusItem]
// 物联网卡卡状态查询 响应参数 卡状态项
type SimNetBlockType struct {
BlockType string `json:"blockType"`
BlockTypeName string `json:"blockTypeName"`
}
type SimCardStatusItem struct {
NetBlockStatus *string `json:"netBlockStatus,omitempty" dc:"断网状态:0未断网 1已断网"`
NetBlockTypes []SimNetBlockType `json:"netBlockTypes,omitempty" dc:"断网类型列表"`
CardStatus int `json:"cardStatus" dc:"卡状态"`
LastChangeDate string `json:"lastChangeDate" dc:"最后变更时间"`
}
// 物联网卡IMEI查询 请求参数
type SimImeiInput = SimBaseReq[SimInputReqNullDate]
// 物联网卡IMEI查询 响应参数
type SimImeiOutput = []*SimBaseRes[SimImeiItem]
// 物联网卡IMEI查询 响应参数 IMEI项
type SimImeiItem struct {
Imei string `json:"imei" dc:"IMEI"`
}
// 单卡本月流量累计使用量查询 请求参数
type SimDataUsageInPoolInput = SimBaseReq[SimInputReqNullDate]
// 单卡本月流量累计使用量查询 响应参数
type SimDataUsageInPoolOutput = []*SimBaseRes[SimDataUsageInPoolItem]
// 单卡本月流量累计使用量查询 响应参数 流量累计使用量项
type SimDataUsageInPoolItem struct {
DataUsage float64 `json:"dataUsage" dc:"流量累计使用量(单位: KB)"`
}
// SimDataUsageInput is the real-time current-month usage contract.
//
// The asynchronous consumer should send one chanKey per request and include
// all three card identifiers available in the card table. ReqData is empty:
// the upstream endpoint queries the current month at call time, unlike the
// historical monthly endpoint which accepts queryDate.
type SimDataUsageInput = SimBaseReq[SimInputReqNullDate]
// 单卡本月流量累计使用量查询 响应参数
type SimDataUsageOutput = []*SimBaseRes[SimDataUsageItem]
// 单卡本月流量累计使用量查询 响应参数 流量累计使用量项
type SimDataUsageItem struct {
PackageFlow *SimPackageFlowItem `json:"packageFlow,omitempty" dc:"Package-period flow in MB, separate from current-month usage"`
PackageFlowError string `json:"packageFlowError,omitempty" dc:"Package flow query failure; absent package flow is not zero"`
// Chan normalizes carrier responses to MB for this real-time contract.
DataUsage float64 `json:"dataUsage" dc:"流量累计使用量(单位: MB)"`
TotalFlow *float64 `json:"totalFlow,omitempty" dc:"套餐总流量(单位: MB)"`
}
// 物联卡达量限速档位查询 请求参数
type SimDataDiagnosisInput = SimBaseReq[SimInputReqNullDate]
// 物联卡达量限速档位查询 响应参数
type SimDataDiagnosisOutput = []*SimBaseRes[any]
// 物联卡达量限速档位查询 响应参数
type SimDataDiagnosisItem struct {
RateLimitStatus string `json:"rateLimitStatus" dc:"达量限速状态:0已触发 1未触发 2未知 3运营商暂不支持"`
RateLimitReason string `json:"rateLimitReason" dc:"达量限速原因"`
RateLimitDetail string `json:"rateLimitDetail" dc:"达量限速明细"`
ApnDetails []SimDataDiagnosisApnDetail `json:"apnDetails" dc:"APN达量限速明细"`
}
type SimDataDiagnosisApnDetail struct {
ApnName string `json:"apnName" dc:"APN名称"`
ApnStatus string `json:"apnStatus" dc:"APN状态"`
ModifyTime string `json:"modifyTime" dc:"APN状态变更时间"`
OverUseDetails string `json:"overUseDetails" dc:"超停原因"`
ApnServiceUsageState string `json:"apnServiceUsageState" dc:"APN业务配额状态"`
PccDetails []SimDataDiagnosisPccDetail `json:"pccDetails" dc:"PCC白名单策略明细"`
}
type SimDataDiagnosisPccDetail struct {
PccServiceCode string `json:"pccServiceCode" dc:"PCC白名单策略编码"`
PccName string `json:"pccName" dc:"PCC白名单策略名称"`
PccPolicyStatus string `json:"pccPolicyStatus" dc:"PCC白名单策略状态"`
PccServiceUsageState string `json:"pccServiceUsageState" dc:"PCC白名单业务配额状态"`
ModifyTime string `json:"modifyTime" dc:"PCC状态变更时间"`
}
// 物联卡单月 GPRS流量使用量批量查询 请求参数
type SimDataUsageMonthlyInput = SimBaseReq[SimDataUsageMonthlyInputItem]
type SimDataUsageMonthlyInputItem struct {
QueryDate string `json:"queryDate" dc:"查询月份,格式yyyyMM,仅支持已结束月份"`
}
// 物联卡单月 GPRS流量使用量批量查询 响应参数
type SimDataUsageMonthlyOutput = []*SimBaseRes[SimDataUsageMonthlyOutputItem]
type SimDataUsageMonthlyOutputItem struct {
DeadLine string `json:"deadLine" dc:"截止时间"`
DataAmount float64 `json:"dataAmount" dc:"流量累计使用量"`
}
// 物联卡单日 GPRS流量使用量查询 请求参数
type SimDataUsageDailyInput = SimBaseReq[SimDataUsageDailyInputItem]
type SimDataUsageDailyInputItem struct {
QueryDate string `json:"queryDate" dc:"查询日期,格式yyyyMMdd,仅支持已结束日期"`
}
// 物联卡单日 GPRS流量使用量查询 响应参数
type SimDataUsageDailyOutput = []*SimBaseRes[SimDataUsageDailyOutputItem]
type SimDataUsageDailyOutputItem struct {
QueryDate string `json:"queryDate" dc:"查询日期,格式yyyyMMdd"`
DataAmount float64 `json:"dataAmount" dc:"单日流量使用量,单位MB"`
}
// 单卡已开通APN信息查询 请求参数
type SimApnInfoInput = SimBaseReq[SimInputReqNullDate]
// 单卡已开通APN信息查询 响应参数
type SimApnInfoOutput = []*SimBaseRes[SimApnInfoItemList]
// 单卡已开通APN信息查询 响应参数 APN信息项
type SimApnInfoItemList struct {
ApnList []SimApnInfoItem `json:"apnList" dc:"APN列表"`
}
type SimApnInfoItem struct {
ApnName string `json:"apnName" dc:"APN名称"`
Status string `json:"status" dc:"APN信息状态(0:暂停 1:恢复/正常)"`
}
// 物联网卡状态变更 请求参数
type SimCardStatusChangeInput = SimBaseReq[SimCardStatusChangeInputItem]
// 物联网卡状态变更 请求参数 操作类型
type SimCardStatusChangeInputItem struct {
OperType string `json:"operType" dc:"单卡卡状态变更操作类型: 0=申请停机(已激活转已停机), 1=申请复机(已停机转已激活)"`
}
// 物联网卡状态变更 响应参数
type SimCardStatusChangeOutput = []*SimBaseRes[SimCardStatusChangeItem]
// 物联网卡状态变更 响应参数 数据项
type SimCardStatusChangeItem struct {
OrderNum string `json:"orderNum" dc:"订单号"`
}
// 单卡 APN功能开停 请求参数
type SimCardOperateChangeApnInput = SimBaseReq[SimCardOperateChangeApnInputItem]
// 单卡 APN功能开停 请求参数 操作类型
type SimCardOperateChangeApnInputItem struct {
OperType string `json:"operType" dc:"APN功能开停操作类型(0:开 1:停)"`
ApnName string `json:"apnName" dc:"APN名称"`
}
// 单卡 APN功能开停 响应参数
type SimCardOperateChangeApnOutput = []*SimBaseRes[SimCardOperateChangeApnItem]
// 单卡 APN功能开停 响应参数 数据项
type SimCardOperateChangeApnItem struct {
OrderNum string `json:"orderNum" dc:"订单号"`
}
// 物联网卡绑定状态查询 请求参数
type SimCardBindStatusInput = SimBaseReq[SimCardBindStatusInputItem]
type SimCardBindStatusInputItem struct {
TestType *int `json:"testType" dc:"分离检测方式:0话单侧检测 1网络侧检测"`
}
type SimCardBindStatusOutput = []*SimBaseRes[SimCardBindStatusItem]
// 物联网卡绑定状态查询 响应参数 数据项
type SimCardBindStatusItem struct {
BindStatus string `json:"bindStatus" dc:"机卡绑定状态"`
CardBindingType string `json:"cardBindingType" dc:"机卡绑定类型"`
OrderStatus string `json:"orderStatus,omitempty" dc:"机卡绑定订购状态:0订购 1未订购"`
BindImei string `json:"bindImei,omitempty" dc:"绑定IMEI"`
LastImei string `json:"lastImei,omitempty" dc:"最近一次上线IMEI"`
ErrorCode string `json:"errorCode,omitempty" dc:"错误码"`
ErrorDes string `json:"errorDes,omitempty" dc:"错误描述"`
}
// 物联网卡设备状态查询 请求参数
type SimDeviceStatusInput = SimBaseReq[SimInputReqNullDate]
type SimDeviceStatusOutput = []*SimBaseRes[SimDeviceStatusItem]
// 物联网卡设备状态查询 响应参数 数据项
type SimDeviceStatusItem struct {
DeviceStatus string `json:"deviceStatus" dc:"兼容设备状态:0异常/不可用 1正常"`
OperatingStatus string `json:"operatingStatus,omitempty" dc:"终端开关机状态:0关机 1开机"`
}
// 物联网卡区域限制状态查询 请求参数
type SimRegionLimitStatusInput = SimBaseReq[SimInputReqNullDate]
type SimRegionLimitStatusOutput = []*SimBaseRes[SimRegionLimitStatusItem]
// 物联网卡区域限制状态查询 响应参数 数据项
type SimRegionLimitStatusItem struct {
RegionLimitStatus string `json:"regionLimitStatus" dc:"地域限制状态"`
OrderStatus string `json:"orderStatus" dc:"区域限制订购状态"`
LimitStatus string `json:"limitStatus" dc:"区域限制触发状态"`
LimitType string `json:"limitType" dc:"区域限制类型"`
LimitArea string `json:"limitArea" dc:"限制区域"`
}
+7
View File
@@ -0,0 +1,7 @@
package model
type SimPackageFlowItem struct {
TotalFlow float64 `json:"totalFlow" dc:"Package total in MB"`
DataUsage float64 `json:"dataUsage" dc:"Package cumulative usage in MB"`
RemainingFlow float64 `json:"remainingFlow" dc:"Max(package total minus package cumulative usage, 0), in MB"`
}