67 lines
2.4 KiB
Go
67 lines
2.4 KiB
Go
package bus_models
|
|
|
|
import (
|
|
"go-admin/app/admin/models"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
AESKey = "3ca176c2d9d0273695f48c55c3170e32d204e125ac06c050c94e0fcec01679ed"
|
|
ShowCount = 100 // 前端展示手机号数量
|
|
)
|
|
|
|
type SmsTask struct {
|
|
models.Model
|
|
|
|
CooperativeNumber string `gorm:"column:cooperative_number"`
|
|
CooperativeName string `gorm:"column:cooperative_name"`
|
|
BatchID string `gorm:"column:batch_id"`
|
|
ImportID string `gorm:"column:import_id"`
|
|
SmsContent string `gorm:"column:sms_content"`
|
|
SmsContentCost int `gorm:"column:sms_content_cost"`
|
|
TotalPhoneCount int `gorm:"column:total_phone_count"`
|
|
TotalSmsCount int `gorm:"column:total_sms_count"`
|
|
Status int `gorm:"column:status"`
|
|
InterceptFailCount int `gorm:"column:intercept_fail_count"`
|
|
ChannelFailCount int `gorm:"column:channel_fail_count"`
|
|
}
|
|
|
|
type SmsTaskBatch struct {
|
|
models.Model
|
|
|
|
TaskID uint64 `gorm:"column:task_id"`
|
|
BatchID string `gorm:"column:batch_id"`
|
|
ImportID string `gorm:"column:import_id"`
|
|
Num int `gorm:"column:num"`
|
|
PhoneCount int `gorm:"column:phone_count"`
|
|
SmsCount int `gorm:"column:sms_count"`
|
|
Status int `gorm:"column:status"`
|
|
InterceptFailCount int `gorm:"column:intercept_fail_count"`
|
|
ChannelFailCount int `gorm:"column:channel_fail_count"`
|
|
}
|
|
|
|
type SmsSendRecord struct {
|
|
models.Model
|
|
|
|
TaskID uint64 `gorm:"column:task_id"`
|
|
TaskBatchID uint64 `gorm:"column:task_batch_id"`
|
|
BatchID string `gorm:"column:batch_id"`
|
|
CooperativeNumber string `gorm:"column:cooperative_number"`
|
|
CooperativeName string `gorm:"column:cooperative_name"`
|
|
Phone string `gorm:"column:phone"`
|
|
SmsContent string `gorm:"column:sms_content"`
|
|
ReceiveTime *time.Time `gorm:"column:receive_time"`
|
|
SmsCode string `gorm:"column:sms_code"`
|
|
}
|
|
|
|
type MassImportPhoneResp struct {
|
|
List []string `json:"list"` // 加密后的数据
|
|
ImportSerialNumber string `json:"import_serial_number"` // 导入excel返回的编号
|
|
}
|
|
|
|
type SendSmsReq struct {
|
|
PhoneList []string `json:"phone_list"` // 手机号码列表
|
|
ImportSerialNumber string `json:"import_serial_number"` // 导入excel返回的编号
|
|
SmsContent string `json:"sms_content"` // 短信内容
|
|
}
|