package model import "time" // Notification 站内消息通知:考试发布 / 考试通过发证 / 岗位设置等事件推送给学员。 type Notification struct { ID uint `gorm:"primaryKey" json:"id"` UserID uint `gorm:"not null;index" json:"user_id"` Type string `gorm:"size:32;not null;index" json:"type"` // exam_publish / exam_pass / position_set Title string `gorm:"size:128;not null" json:"title"` Content string `gorm:"type:text;not null" json:"content"` Link string `gorm:"size:128;default:''" json:"link"` // 前端跳转路由 Read bool `gorm:"not null;default:false;index" json:"read"` CreatedAt time.Time `json:"created_at"` } func (Notification) TableName() string { return "notification" }