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

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

@Getter @Setter @Entity @Table(name = "vanilla_game")
public class VanillaGameEntity {
    @Id @Column private UUID sessionId;
    @Column(unique = true) private UUID userId;
    @Column private LocalDateTime startZeit;
    @Column private LocalDateTime letzteAktivitaet;
    @OneToMany(mappedBy = "session", fetch = FetchType.EAGER)
    private List<VanillaMitspielerEntity> mitspieler = new ArrayList<>();
    @Column private Integer aufgabenProLevel;
    @Column private Integer level;
    @Column private Integer aufgabenAufAktuellemLevel;
    @Column(columnDefinition = "TEXT") private String aufgaben;
    @Column(columnDefinition = "TEXT") private String activeTaskJson;
    @Column private LocalDateTime taskStartedAt;
    @Column private UUID setupId;
}
