package com.astalange.core.entity;

import jakarta.persistence.*;

@Entity
@Table(name = "dotation")
public class Dotation {

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

    @ManyToOne(optional = false)
    @JoinColumn(name = "licence_id", nullable = false)
    private Licence licence;

    @ManyToOne(optional = false)
    @JoinColumn(name = "equipement_id", nullable = false)
    private Equipement equipement;

    @Column(length = 10)
    private String taille;

    @Column(length = 50)
    private String flocage;

    @Column(nullable = false)
    private Boolean fourni = false;

    @Column(length = 10)
    private String numero;

    @Column(nullable = false)
    private Boolean choisi = false;

    // Getters and Setters

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public Licence getLicence() { return licence; }
    public void setLicence(Licence licence) { this.licence = licence; }

    public Equipement getEquipement() { return equipement; }
    public void setEquipement(Equipement equipement) { this.equipement = equipement; }

    public String getTaille() { return taille; }
    public void setTaille(String taille) { this.taille = taille; }

    public String getFlocage() { return flocage; }
    public void setFlocage(String flocage) { this.flocage = flocage; }

    public Boolean getFourni() { return fourni; }
    public void setFourni(Boolean fourni) { this.fourni = fourni; }

    public String getNumero() { return numero; }
    public void setNumero(String numero) { this.numero = numero; }

    public Boolean getChoisi() { return choisi; }
    public void setChoisi(Boolean choisi) { this.choisi = choisi; }
}
