Files
junhong_cmp_fiber/internal/model/dto/client_realname_device_dto.go
huang 8f3a68a673
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m5s
新增上游的停机原因
2026-05-12 11:13:04 +08:00

108 lines
5.3 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
// ========================================
// E1 实名链接获取
// ========================================
// RealnimeLinkRequest E1 实名链接请求
type RealnimeLinkRequest struct {
Identifier string `json:"identifier" query:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符SN/IMEI/虚拟号/ICCID/MSISDN"`
ICCID string `json:"iccid" query:"iccid" validate:"omitempty,max=30" maxLength:"30" description:"物联网卡ICCID"`
}
// RealnimeLinkResponse E1 实名链接响应
type RealnimeLinkResponse struct {
RealnameMode string `json:"realname_mode" description:"实名模式 (none:无需实名, template:模板实名, gateway:网关实名)"`
RealnameURL string `json:"realname_url" description:"实名链接"`
CardInfo CardInfoBrief `json:"card_info" description:"卡片简要信息"`
ExpireAt *string `json:"expire_at,omitempty" description:"过期时间"`
}
// CardInfoBrief E1 卡片简要信息
type CardInfoBrief struct {
ICCID string `json:"iccid" description:"物联网卡ICCID"`
MSISDN string `json:"msisdn" description:"手机号"`
VirtualNo string `json:"virtual_no" description:"虚拟号"`
}
// ========================================
// F1 设备卡列表
// ========================================
// DeviceCardListRequest F1 设备卡列表请求
type DeviceCardListRequest struct {
Identifier string `json:"identifier" query:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符SN/IMEI/虚拟号/ICCID/MSISDN"`
}
// DeviceCardItem F1 设备卡项
type DeviceCardItem struct {
CardID uint `json:"card_id" description:"卡ID"`
ICCID string `json:"iccid" description:"物联网卡ICCID"`
MSISDN string `json:"msisdn" description:"手机号"`
CarrierType string `json:"carrier_type" description:"运营商类型(CMCC/CUCC/CTCC/CBN)"`
CarrierName string `json:"carrier_name" description:"运营商名称"`
NetworkStatus string `json:"network_status" description:"网络状态"`
GatewayExtend string `json:"gateway_extend" description:"Gateway 卡状态扩展字段,原样返回上游 extend用于展示运营商侧实际停机原因"`
RealNameStatus int `json:"real_name_status" description:"实名状态 (0:未实名, 1:已实名)"`
SlotPosition int `json:"slot_position" description:"插槽位置"`
IsActive bool `json:"is_active" description:"是否当前激活卡"`
RealnamePolicy string `json:"realname_policy" description:"实名认证策略 (none:无需实名, before_order:先实名后充值/购买, after_order:先充值/购买后实名)"`
}
// DeviceCardListResponse F1 设备卡列表响应
type DeviceCardListResponse struct {
Cards []DeviceCardItem `json:"cards" description:"设备卡列表"`
}
// ========================================
// F2 设备重启
// ========================================
// DeviceRebootRequest F2 设备重启请求
type DeviceRebootRequest struct {
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符SN/IMEI/虚拟号/ICCID/MSISDN"`
}
// DeviceOperationResponse F2/F3/F4 设备操作响应
type DeviceOperationResponse struct {
Accepted bool `json:"accepted" description:"是否已受理"`
RequestID string `json:"request_id,omitempty" description:"请求ID"`
}
// ========================================
// F3 恢复出厂设置
// ========================================
// DeviceFactoryResetRequest F3 恢复出厂设置请求
type DeviceFactoryResetRequest struct {
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符SN/IMEI/虚拟号/ICCID/MSISDN"`
}
// ========================================
// F4 设备WiFi配置
// ========================================
// DeviceWifiRequest F4 设备WiFi配置请求
type DeviceWifiRequest struct {
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符SN/IMEI/虚拟号/ICCID/MSISDN"`
SSID string `json:"ssid" validate:"required,min=1,max=32" required:"true" minLength:"1" maxLength:"32" description:"WiFi名称"`
Password string `json:"password" validate:"required,min=1,max=64" required:"true" minLength:"1" maxLength:"64" description:"WiFi密码"`
Enabled bool `json:"enabled" validate:"required" required:"true" description:"是否启用WiFi"`
}
// ========================================
// F5 设备切卡
// ========================================
// DeviceSwitchCardRequest F5 设备切卡请求
type DeviceSwitchCardRequest struct {
Identifier string `json:"identifier" validate:"required,min=1,max=50" required:"true" minLength:"1" maxLength:"50" description:"资产标识符SN/IMEI/虚拟号/ICCID/MSISDN"`
TargetICCID string `json:"target_iccid" validate:"required,min=1,max=30" required:"true" minLength:"1" maxLength:"30" description:"目标ICCID"`
}
// DeviceSwitchCardResponse F5 设备切卡响应
type DeviceSwitchCardResponse struct {
Accepted bool `json:"accepted" description:"是否已受理"`
TargetICCID string `json:"target_iccid" description:"目标ICCID"`
}