fix: enforce not null constraint and default value for UnreadNotificationsCount

This commit is contained in:
2025-11-30 19:36:07 +08:00
parent 4a6c214709
commit 566234c30c

View File

@@ -19,7 +19,7 @@ type User struct {
CommentsCount int CommentsCount int
Resources []Resource `gorm:"foreignKey:UserID"` Resources []Resource `gorm:"foreignKey:UserID"`
Bio string Bio string
UnreadNotificationsCount uint UnreadNotificationsCount uint `gorm:"not null;default:0"`
} }
type UserView struct { type UserView struct {