chore(init): 初始化解忧商行项目并完成 Phase 0 基座

This commit is contained in:
yml2213
2026-10-30 11:46:10 +08:00
commit 8d9481c251
689 changed files with 138703 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
package model
import "time"
type Notification struct {
ID uint64 `gorm:"primaryKey" json:"id"`
UserID uint64 `gorm:"not null;index" json:"user_id"`
Type string `gorm:"size:32;not null" json:"type"`
Title string `gorm:"size:128;not null" json:"title"`
Content string `json:"content"`
BizType string `gorm:"size:32;not null;default:''" json:"biz_type"`
BizID *uint64 `json:"biz_id"`
DistributionSiteID *uint64 `gorm:"index" json:"distribution_site_id"`
ReadAt *time.Time `json:"read_at"`
CreatedAt time.Time `json:"created_at"`
}
func (Notification) TableName() string {
return "notifications"
}
type AdminNotification struct {
ID uint64 `gorm:"primaryKey" json:"id"`
AdminUserID uint64 `gorm:"not null;index" json:"admin_user_id"`
Type string `gorm:"size:32;not null" json:"type"`
Title string `gorm:"size:128;not null" json:"title"`
Content string `json:"content"`
IsRead bool `gorm:"not null;default:false" json:"is_read"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (AdminNotification) TableName() string {
return "admin_notifications"
}