package de.oaa.xxx.games.vanilla.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.UUID;

@Getter @Setter @Entity @Table(name = "vanilla_einladung")
public class VanillaEinladungEntity {
    public enum Status { PENDING, ACCEPTED_OWN, ACCEPTED_HOST, DECLINED, CANCELLED }
    @Id @Column private UUID einladungId;
    @Column(nullable = false) private UUID setupId;
    @Column private UUID sessionId;
    @Column(nullable = false) private UUID inviterId;
    @Column(nullable = false) private UUID inviteeId;
    @Column(nullable = false) private int slotIndex;
    @Enumerated(EnumType.STRING) @Column(nullable = false, length = 20) private Status status;
    @Column(nullable = false) private LocalDateTime createdAt;
    @Column(columnDefinition = "TEXT") private String spielerDatenJson;
    @Column(nullable = false, columnDefinition = "BOOLEAN DEFAULT false") private boolean bereit;
}
