137 lines
8.6 KiB
Go
137 lines
8.6 KiB
Go
package model
|
|
|
|
import (
|
|
"git.5iot.com/iotlcm-public/iotlcm-app/internal/model/request"
|
|
|
|
"github.com/gogf/gf/v2/os/gtime"
|
|
)
|
|
|
|
type AppWarningConfigListParam struct {
|
|
request.PageInfo
|
|
CardValue string `json:"cardValue" form:"cardValue" v:"required#请输入ICCID、MSISDN、IMSI或IMEI" dc:"卡号标识"`
|
|
}
|
|
|
|
type AppWarningConfigSaveParam struct {
|
|
CardValue string `json:"cardValue" v:"required#请输入ICCID、MSISDN、IMSI或IMEI" dc:"卡号标识"`
|
|
WarnUnit int `json:"warnUnit" v:"required#请选择预警类型" dc:"预警单位:1MB"`
|
|
FirstWarn float64 `json:"firstWarn" v:"required#第一档阈值不能为空" dc:"第一档预警阈值"`
|
|
SecondWarn float64 `json:"secondWarn" dc:"第二档预警阈值"`
|
|
ThirdWarn float64 `json:"thirdWarn" dc:"第三档预警阈值"`
|
|
IsEnabled *int `json:"isEnabled" dc:"是否启用:1启用,0停用"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
}
|
|
|
|
type AppWarningConfigBatchSaveParam struct {
|
|
CardValues []string `json:"cardValues" v:"required#请选择需要配置预警的卡片" dc:"卡号标识列表"`
|
|
Configs []*AppWarningConfigBatchItemParam `json:"configs" v:"required#请至少填写一项预警配置" dc:"预警配置列表"`
|
|
}
|
|
|
|
type AppWarningConfigBatchItemParam struct {
|
|
WarnUnit int `json:"warnUnit" v:"required#请选择预警类型" dc:"预警单位:1MB"`
|
|
FirstWarn float64 `json:"firstWarn" v:"required#第一档阈值不能为空" dc:"第一档预警阈值"`
|
|
SecondWarn float64 `json:"secondWarn" dc:"第二档预警阈值"`
|
|
ThirdWarn float64 `json:"thirdWarn" dc:"第三档预警阈值"`
|
|
IsEnabled *int `json:"isEnabled" dc:"是否启用:1启用,0停用"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
Remark string `json:"remark" dc:"备注"`
|
|
}
|
|
|
|
type AppWarningConfigNotifyParam struct {
|
|
CardValue string `json:"cardValue" v:"required#请输入ICCID、MSISDN、IMSI或IMEI" dc:"卡号标识"`
|
|
WarnUnit int `json:"warnUnit" dc:"预警单位:1MB"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" v:"required#请选择是否开启小程序预警通知" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
}
|
|
|
|
type AppWarningConfigBatchNotifyParam struct {
|
|
CardValues []string `json:"cardValues" v:"required#请选择需要配置预警的卡片" dc:"卡号标识列表"`
|
|
WarnUnit int `json:"warnUnit" dc:"预警单位:1MB"`
|
|
AppNotifyEnabled *int `json:"appNotifyEnabled" v:"required#请选择是否开启小程序预警通知" dc:"是否开启小程序预警通知:1开启,0关闭"`
|
|
}
|
|
|
|
type AppWarningConfigModel struct {
|
|
Id int64 `json:"id" orm:"id" dc:"主键ID"`
|
|
ItemType int `json:"itemType" orm:"item_type" dc:"对象类型:1单卡"`
|
|
ItemId int64 `json:"itemId" orm:"item_id" dc:"对象ID"`
|
|
ItemCode string `json:"itemCode" orm:"item_code" dc:"对象编码快照"`
|
|
WarnType int `json:"warnType" dc:"运行时推导预警类型"`
|
|
WarnUnit int `json:"warnUnit" orm:"warn_unit" dc:"预警单位"`
|
|
WarnTitle string `json:"warnTitle" dc:"预警类型标题"`
|
|
UnitText string `json:"unitText" dc:"单位文本"`
|
|
FirstWarn float64 `json:"firstWarn" orm:"first_warn" dc:"第一档预警阈值"`
|
|
SecondWarn float64 `json:"secondWarn" orm:"second_warn" dc:"第二档预警阈值"`
|
|
ThirdWarn float64 `json:"thirdWarn" orm:"third_warn" dc:"第三档预警阈值"`
|
|
AutoAction int `json:"autoAction" orm:"auto_action" dc:"自动动作"`
|
|
IsEnabled int `json:"isEnabled" orm:"is_enabled" dc:"是否启用"`
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" orm:"app_notify_enabled" dc:"是否开启小程序预警通知"`
|
|
WxTemplateId string `json:"wxTemplateId" orm:"wx_template_id" dc:"微信订阅消息模板ID"`
|
|
Remark string `json:"remark" orm:"remark" dc:"备注"`
|
|
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" dc:"更新时间"`
|
|
}
|
|
|
|
type AppWarningConfigListModel struct {
|
|
Card *AppCardModel `json:"card" dc:"卡片信息"`
|
|
Items []*AppWarningConfigModel `json:"items" dc:"预警配置列表"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigSaveModel struct {
|
|
Id int64 `json:"id" dc:"配置ID"`
|
|
Config *AppWarningConfigModel `json:"config" dc:"保存后的配置"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigBatchFailItem struct {
|
|
CardValue string `json:"cardValue" dc:"卡号标识"`
|
|
Reason string `json:"reason" dc:"失败原因"`
|
|
}
|
|
|
|
type AppWarningConfigMetaModel struct {
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" dc:"批量配置表单的默认提醒开关,仅用于兼容旧客户端,不代表当前账号的实际配置状态"`
|
|
ActiveConfigCount int `json:"activeConfigCount" dc:"当前账号创建的有效流量预警配置数"`
|
|
NotifyConfigCount int `json:"notifyConfigCount" dc:"当前账号创建且开启微信提醒的有效流量预警配置数"`
|
|
}
|
|
|
|
type AppWarningConfigBatchSaveModel struct {
|
|
BatchNo string `json:"batchNo" dc:"配置批次号"`
|
|
TotalCount int `json:"totalCount" dc:"提交卡数"`
|
|
SuccessCount int `json:"successCount" dc:"成功卡数"`
|
|
FailCount int `json:"failCount" dc:"失败卡数"`
|
|
FailItems []*AppWarningConfigBatchFailItem `json:"failItems" dc:"失败明细"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigNotifyModel struct {
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知"`
|
|
Config *AppWarningConfigModel `json:"config" dc:"更新后的预警配置"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|
|
|
|
type AppWarningConfigBatchNotifyModel struct {
|
|
AppNotifyEnabled int `json:"appNotifyEnabled" dc:"是否开启小程序预警通知"`
|
|
TotalCount int `json:"totalCount" dc:"提交卡数"`
|
|
SuccessCount int `json:"successCount" dc:"成功卡数"`
|
|
FailCount int `json:"failCount" dc:"失败卡数"`
|
|
FailItems []*AppWarningConfigBatchFailItem `json:"failItems" dc:"失败明细"`
|
|
TemplateId string `json:"templateId" dc:"微信订阅消息模板ID"`
|
|
TemplateReady bool `json:"templateReady" dc:"模板ID是否已配置"`
|
|
WechatBound bool `json:"wechatBound" dc:"是否已绑定微信用户"`
|
|
WechatBindText string `json:"wechatBindText" dc:"微信绑定状态文本"`
|
|
}
|