package fr.titionfire.ffsaf.data.model;

import io.quarkus.runtime.annotations.RegisterForReflection;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@RegisterForReflection

@Entity
@Table(name = "cardboard")
public class CardboardModel {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    Long id;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "comb", referencedColumnName = "id")
    MembreModel comb;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "guest_comb", referencedColumnName = "id")
    CompetitionGuestModel guestComb;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "match", referencedColumnName = "id")
    MatchModel match;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "compet", referencedColumnName = "id")
    CompetitionModel compet;

    int red;
    int yellow;
}
