26 lines
983 B
Go
26 lines
983 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// Report represents a content moderation report (v0.803 ADM1)
|
|
type Report struct {
|
|
ID uuid.UUID `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
|
|
ReporterID uuid.UUID `gorm:"type:uuid;not null" json:"reporter_id"`
|
|
ReportedUserID *uuid.UUID `gorm:"type:uuid" json:"reported_user_id,omitempty"`
|
|
ContentType string `gorm:"size:50;not null" json:"content_type"`
|
|
ContentID *uuid.UUID `gorm:"type:uuid" json:"content_id,omitempty"`
|
|
Reason string `gorm:"type:text;not null" json:"reason"`
|
|
Status string `gorm:"size:20;not null;default:pending" json:"status"`
|
|
ResolvedBy *uuid.UUID `gorm:"type:uuid" json:"resolved_by,omitempty"`
|
|
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
|
|
CreatedAt time.Time `gorm:"not null" json:"created_at"`
|
|
}
|
|
|
|
// TableName returns the table name
|
|
func (Report) TableName() string {
|
|
return "reports"
|
|
}
|