mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 10:42:57 +00:00
dev day #79
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type CommentBan struct {
|
||||
BaseModel
|
||||
UserID uint `json:"user_id" gorm:"index;not null"`
|
||||
Reason string `json:"reason" gorm:"type:text"`
|
||||
Until *time.Time `json:"until" gorm:"index"` // nil = permanent
|
||||
CreatedByID uint `json:"created_by_id" gorm:"index"`
|
||||
}
|
||||
|
||||
func (CommentBan) TableName() string { return "comment_bans" }
|
||||
|
||||
type UnbanRequest struct {
|
||||
BaseModel
|
||||
UserID uint `json:"user_id" gorm:"index;not null"`
|
||||
Message string `json:"message" gorm:"type:text"`
|
||||
Status string `json:"status" gorm:"size:20;default:'pending';index"` // pending|approved|rejected
|
||||
ResolvedByID *uint `json:"resolved_by_id" gorm:"index"`
|
||||
ResolvedAt *time.Time `json:"resolved_at"`
|
||||
}
|
||||
|
||||
func (UnbanRequest) TableName() string { return "unban_requests" }
|
||||
Reference in New Issue
Block a user