uint/uint64全部改为uint32

This commit is contained in:
2025-11-10 22:23:31 +08:00
parent 3e711551e7
commit ecd2d37c70
96 changed files with 775 additions and 785 deletions

View File

@@ -2,8 +2,6 @@ package models
import (
"time"
"gorm.io/gorm"
)
// NotifierType 定义了通知器的类型。
@@ -31,12 +29,12 @@ const (
// Notification 表示已发送或尝试发送的通知记录。
type Notification struct {
gorm.Model
Model
// NotifierType 通知器类型 (例如:"邮件", "企业微信", "飞书", "日志")
NotifierType NotifierType `gorm:"type:varchar(20);not null;index" json:"notifier_type"`
// UserID 接收通知的用户ID用于追溯通知记录到特定用户
UserID uint `gorm:"index" json:"user_id"` // 增加 UserID 字段,并添加索引
UserID uint32 `gorm:"index" json:"user_id"` // 增加 UserID 字段,并添加索引
// Title 通知标题
Title string `gorm:"type:varchar(255);not null" json:"title"`
// Message 通知内容