package models

import (
	"time"

	"github.com/google/uuid"
)

type Penalty struct {
	ID        uuid.UUID  `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
	UserID    uuid.UUID  `gorm:"type:uuid;not null;index" json:"user_id"`
	Reason    string     `gorm:"type:varchar(32);not null" json:"reason"`
	MatchID   *uuid.UUID `gorm:"type:uuid" json:"match_id,omitempty"`
	ExpiresAt time.Time  `gorm:"not null" json:"expires_at"`
	CreatedAt time.Time  `gorm:"not null" json:"created_at"`
}

const (
	PenaltyAcceptTimeout = "accept_timeout"
	PenaltyAbandon       = "abandon"
	PenaltyGrief         = "grief"
)
