mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +00:00
feat: notifications
This commit is contained in:
@@ -18,9 +18,10 @@ const (
|
||||
|
||||
type Activity struct {
|
||||
gorm.Model
|
||||
UserID uint `gorm:"not null"`
|
||||
Type ActivityType `gorm:"not null;index:idx_type_refid"`
|
||||
RefID uint `gorm:"not null;index:idx_type_refid"`
|
||||
UserID uint `gorm:"not null"`
|
||||
Type ActivityType `gorm:"not null;index:idx_type_refid"`
|
||||
RefID uint `gorm:"not null;index:idx_type_refid"`
|
||||
NotifyTo uint `gorm:"default:null;index"`
|
||||
}
|
||||
|
||||
type ActivityView struct {
|
||||
|
||||
@@ -9,16 +9,17 @@ import (
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
Username string `gorm:"uniqueIndex;not null"`
|
||||
PasswordHash []byte
|
||||
IsAdmin bool
|
||||
CanUpload bool
|
||||
AvatarVersion int
|
||||
ResourcesCount int
|
||||
FilesCount int
|
||||
CommentsCount int
|
||||
Resources []Resource `gorm:"foreignKey:UserID"`
|
||||
Bio string
|
||||
Username string `gorm:"uniqueIndex;not null"`
|
||||
PasswordHash []byte
|
||||
IsAdmin bool
|
||||
CanUpload bool
|
||||
AvatarVersion int
|
||||
ResourcesCount int
|
||||
FilesCount int
|
||||
CommentsCount int
|
||||
Resources []Resource `gorm:"foreignKey:UserID"`
|
||||
Bio string
|
||||
UnreadNotificationsCount uint
|
||||
}
|
||||
|
||||
type UserView struct {
|
||||
|
||||
Reference in New Issue
Block a user