feat: 添加配额相关字段并优化日志时间类型
- 在MailLog结构体中添加QuotaID字段用于关联配额信息 - 在UpdateQuotaReq结构体中增加ExpireAt、CycleUnit和CycleResetAt字段, 支持配额过期时间和周期设置 - 将CheckLog中的时间相关字段从string类型改为time.Time类型, 提高时间处理的准确性
This commit is contained in:
@@ -154,6 +154,7 @@ type MailLog struct {
|
||||
GormModel
|
||||
UserID int `json:"user_id"`
|
||||
AccountID uint `json:"account_id"`
|
||||
QuotaID *uint `json:"quota_id"`
|
||||
ChannelID *uint `json:"channel_id"`
|
||||
SenderAccountID *uint `json:"sender_account_id"`
|
||||
SignatureID *uint `json:"signature_id"`
|
||||
@@ -222,6 +223,9 @@ type CreateQuotaReq struct {
|
||||
type UpdateQuotaReq struct {
|
||||
Total *int `json:"total,omitempty"`
|
||||
Status *int8 `json:"status,omitempty"`
|
||||
ExpireAt *string `json:"expire_at,omitempty"`
|
||||
CycleUnit *string `json:"cycle_unit,omitempty"`
|
||||
CycleResetAt *string `json:"cycle_reset_at,omitempty"`
|
||||
}
|
||||
|
||||
type QuotaListQuery struct {
|
||||
@@ -452,12 +456,12 @@ type CheckLog struct {
|
||||
ID uint `json:"id"`
|
||||
SenderAccountID uint `json:"sender_account_id"`
|
||||
VerificationCode string `json:"verification_code"`
|
||||
SentAt string `json:"sent_at"`
|
||||
SentAt time.Time `json:"sent_at"`
|
||||
Received bool `json:"received"`
|
||||
ReceivedAt *string `json:"received_at"`
|
||||
ReceivedAt *time.Time `json:"received_at"`
|
||||
LatencyMs int `json:"latency_ms"`
|
||||
ErrorMessage string `json:"error_message"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type CheckLogQuery struct {
|
||||
|
||||
Reference in New Issue
Block a user