package model import ( "git.5iot.com/iotlcm-public/iotlcm-openapi/internal/model/entity" ) type QuerySimInput struct { AppId string `json:"appId"` Iccid string `json:"iccid"` Msisdn string `json:"msisdn"` Imsi string `json:"imsi"` } type QuerySimInfoOutput struct { Iccid string `json:"iccid"` // ICCID 卡号 Msisdn string `json:"msisdn"` // 手机号 Imsi string `json:"imsi"` // IMSI 码 Imei string `json:"imei"` // IMEI 码(可能为空) Username string `json:"username"` // 用户名称 Location string `json:"location"` // 归属地 PlanCategory string `json:"planCategory"` // 套餐类别 CurrentPlanName string `json:"currentPlanName"` // 当前套餐名称 Plangroup string `json:"plangroup"` // 套餐分组(废弃) Planid string `json:"planid"` // 套餐ID Appid string `json:"appid"` // 应用ID AllowPlanChange int `json:"allowPlanChange"` // 是否允许改套餐 1=允许 LastSyncTime string `json:"lastSyncTime"` // 最后同步时间(流量) AccessType string `json:"accessType"` // 网络类型 IPV4/IPV6 CardStatus string `json:"cardStatus"` // 卡状态:可测试/正常/停机等 CardType interface{} `json:"cardType"` // 卡类型 NetworkType interface{} `json:"networkType"` // 网络类型 ActivationDate string `json:"activationDate"` // 激活日期 ActiveDate string `json:"activeDate"` // 生效日期 ValidityPeriod int `json:"validityPeriod"` // 有效期(月) ExpiryDate string `json:"expiryDate"` // 到期日 TestPeriod int `json:"testPeriod"` // 测试期 TestPeriodExpiryDate interface{} `json:"testPeriodExpiryDate"` // 测试期到期日 SilentPeriod int `json:"silentPeriod"` // 沉默期 SilentPeriodExpiryDate interface{} `json:"silentPeriodExpiryDate"` // 沉默期到期日 DataService int `json:"dataService"` // 数据业务是否开通 PlanData int `json:"planData"` // 套餐总流量(MB) UsedData float64 `json:"usedData"` // 已用流量(MB) RemainingData string `json:"remainingData"` // 剩余流量 SmsService int `json:"smsService"` // 短信业务是否开通 PlanSMS int `json:"planSMS"` // 套餐短信总数 UsedSMS int `json:"usedSMS"` // 已用短信 RemainingSMS string `json:"remainingSMS"` // 剩余短信 VoiceService int `json:"voiceService"` // 语音业务是否开通 PlanMinutes int `json:"planMinutes"` // 套餐语音时长 UsedMinutes int `json:"usedMinutes"` // 已用语音时长 RemainingMinutes string `json:"remainingMinutes"` // 剩余语音时长 InternationalRoamingService int `json:"internationalRoamingService"` // 国际漫游服务 PlanInternationalData int `json:"planInternationalData"` // 国际漫游套餐流量 UsedInternationalData int `json:"usedInternationalData"` // 已用国际漫游流量 RemainingInternationalData string `json:"remainingInternationalData"` // 剩余国际漫游流量 Description interface{} `json:"description"` // 备注描述 } type QuerySimInfoCard struct { entity.TSimCardInfo DeptName string `json:"deptName"` DeptKey string `json:"deptKey"` DeptAreaCode string `json:"deptAreaCode"` PackageName string `json:"packageName"` CategoryCode string `json:"categoryCode"` CategoryName string `json:"categoryName"` } type QuerySimLimitOutput struct { TrafficCutoffStatus int `json:"trafficCutoffStatus" dc:"达量断网配置状态:0删除,1已开启,2已关闭"` TrafficCutoffName string `json:"trafficCutoffName" dc:"达量断网类型"` TrafficCutoffThreshold float64 `json:"trafficCutoffThreshold" dc:"达量断网阈值"` } type QuerySimImeiOutput struct { Imei string `json:"imei"` } type QuerySimUsageOutput struct { UseUnit string `json:"useUnit"` UseAmount float64 `json:"useAmount"` } // QuerySimCardStatusOutput 单卡状态信息查询 响应参数 // lifeCycle 取值用平台内部枚举(与 t_boss_card_status 字典一致), // 非 openapi-docs 公共字典那套(两者数字含义不同,勿混用)。 type QuerySimCardStatusOutput struct { Iccid string `json:"iccid"` // ICCID LifeCycle int `json:"lifeCycle"` // 卡状态编码(平台内部枚举) LifeCycleName string `json:"lifeCycleName"` // 卡状态名称 } // ===== 批量查询(卡状态 / 流量) ===== // QuerySimBatchCard 批量查询用单卡标识(iccid/msisdn/imsi 至少传一个) type QuerySimBatchCard struct { Msisdn string `json:"msisdn,omitempty" dc:"MSISDN/卡号"` Iccid string `json:"iccid,omitempty" dc:"ICCID"` Imsi string `json:"imsi,omitempty" dc:"IMSI"` } // QuerySimStatusBatchParam 批量卡状态查询入参 type QuerySimStatusBatchParam struct { AppId string `json:"appId" v:"required#appId不能为空" dc:"平台API应用ID"` Cards []QuerySimBatchCard `json:"cards" v:"required#查询卡不能为空" dc:"查询卡列表"` } // QuerySimStatusBatchItem 单卡状态结果(按输入顺序返回;未匹配见 Matched=false + errorCode) type QuerySimStatusBatchItem struct { Matched bool `json:"matched"` Iccid string `json:"iccid,omitempty"` LifeCycle int `json:"lifeCycle"` // 卡状态编码(平台内部枚举) LifeCycleName string `json:"lifeCycleName,omitempty"` ErrorCode string `json:"errorCode,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` } // QuerySimStatusBatchOutput 批量卡状态查询出参 type QuerySimStatusBatchOutput struct { Total int `json:"total"` MatchedCount int `json:"matchedCount"` NotFoundCount int `json:"notFoundCount"` Items []QuerySimStatusBatchItem `json:"items"` } // QuerySimUsageBatchParam 批量流量查询入参 type QuerySimUsageBatchParam struct { AppId string `json:"appId" v:"required#appId不能为空" dc:"平台API应用ID"` Cards []QuerySimBatchCard `json:"cards" v:"required#查询卡不能为空" dc:"查询卡列表"` } // QuerySimUsageBatchItem 单卡流量结果 type QuerySimUsageBatchItem struct { Matched bool `json:"matched"` Iccid string `json:"iccid,omitempty"` UseUnit string `json:"useUnit"` // 流量单位,固定为 MB UseAmount float64 `json:"useAmount"` // 当前周期已用流量,单位 MB ErrorCode string `json:"errorCode,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` } // QuerySimUsageBatchOutput 批量流量查询出参 type QuerySimUsageBatchOutput struct { Total int `json:"total"` MatchedCount int `json:"matchedCount"` NotFoundCount int `json:"notFoundCount"` Items []QuerySimUsageBatchItem `json:"items"` } // ===== 批量 IMEI 查询 ===== // QuerySimImeiBatchParam 批量 IMEI 查询入参(与 sim-status-batch / sim-usage-batch 同构) type QuerySimImeiBatchParam struct { AppId string `json:"appId" v:"required#appId不能为空" dc:"平台API应用ID"` Cards []QuerySimBatchCard `json:"cards" v:"required#查询卡不能为空" dc:"查询卡列表"` } // QuerySimImeiBatchItem 单卡 IMEI 结果(按输入顺序返回;未匹配见 Matched=false + errorCode) // // Imei 为空不算 notFound:卡存在但上游从未查到值(如不支持的模板通道)。 type QuerySimImeiBatchItem struct { Matched bool `json:"matched"` Iccid string `json:"iccid,omitempty"` Imei string `json:"imei"` // IMEI,未上报时为空字符串 ErrorCode string `json:"errorCode,omitempty"` ErrorMessage string `json:"errorMessage,omitempty"` } // QuerySimImeiBatchOutput 批量 IMEI 查询出参 type QuerySimImeiBatchOutput struct { Total int `json:"total"` MatchedCount int `json:"matchedCount"` NotFoundCount int `json:"notFoundCount"` Items []QuerySimImeiBatchItem `json:"items"` }