mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-03 18:22:57 +00:00
25 lines
793 B
Go
25 lines
793 B
Go
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" }
|