This commit is contained in:
Tomas Dvorak
2025-11-02 01:04:02 +01:00
parent ac886502e0
commit b9cea0cd77
153 changed files with 43713 additions and 1700 deletions
+24
View File
@@ -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" }