package de.oaa.xxx.games.chastity.tasks;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.UUID;

@Getter
@Setter
@Entity
@Table(name = "assigned_task")
public class AssignedTaskEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.UUID)
    private UUID taskId;

    @Column(nullable = false)
    private UUID lockId;

    @Column
    private String taskTitle;

    @Column(columnDefinition = "TEXT")
    private String taskDescription;

    @Column(columnDefinition = "TEXT", nullable = false)
    private String taskText;

    @Column
    private Integer taskMinutes;

    @Column(nullable = false)
    private LocalDateTime assignedAt;

    @Column(nullable = false)
    private LocalDateTime acceptDeadline;

    /** Wie viele Minuten einfrieren bei Ablehnung / Ablauf (null = keine Freeze-Strafe). */
    @Column
    private Integer penaltyFreezeMinutes;

    /** Wie viele rote Karten hinzufügen bei Ablehnung / Ablauf (null = keine). */
    @Column
    private Integer penaltyRedCards;
    
    @Column 
    private Integer penaltyAddTime;

    /** PENDING | ACCEPTED | DECLINED | EXPIRED */
    @Column(nullable = false)
    private String status = "PENDING";
}
