1、收码

This commit is contained in:
2025-07-24 23:34:07 +08:00
parent 398b8af489
commit 854d7bee0c
24 changed files with 2479 additions and 10 deletions

View File

@ -0,0 +1,38 @@
package models
import (
"go-admin/common/models"
"time"
)
type SmsPhone struct {
models.Model
UserId int `json:"userId" gorm:"type:bigint;comment:用户Id"`
Service string `json:"service" gorm:"type:varchar(50);comment:sms 服务"`
ServiceCode string `json:"serviceCode" gorm:"type:varchar(30);comment:服务code"`
Type int `json:"type" gorm:"type:tinyint;comment:类型 0-短效 1-长效"`
Period int `json:"period" gorm:"type:int;comment:时长(月)"`
Phone string `json:"phone" gorm:"type:varchar(30);comment:号码"`
ActivationId int `json:"activationId" gorm:"type:int;comment:激活码id"`
NewActivationId int `json:"newActivationId" gorm:"type:int;comment:新激活码id 每次获取验证码会刷新"`
MessageId int `json:"messageId" gorm:"type:int;comment:短信模板id"`
Code string `json:"code" gorm:"type:varchar(10);comment:验证码"`
Status int `json:"status" gorm:"type:tinyint;comment:状态 1-等待验证码 2-已获取"`
ExpireTime *time.Time `json:"expireTime" gorm:"type:datetime;comment:过期时间"`
models.ModelTime
models.ControlBy
}
func (SmsPhone) TableName() string {
return "sms_phone"
}
func (e *SmsPhone) Generate() models.ActiveRecord {
o := *e
return &o
}
func (e *SmsPhone) GetId() interface{} {
return e.Id
}