package com.astalange.core.entity;

import jakarta.persistence.*;

@Entity
@Table(name = "categorie_equipement")
public class CategorieEquipement {

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

    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    @JoinColumn(name = "categorie_id", nullable = false)
    private Categorie categorie;

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

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

    @Column(nullable = false, precision = 10, scale = 2)
    private java.math.BigDecimal prix = java.math.BigDecimal.ZERO;

    // Getters and Setters

    public java.math.BigDecimal getPrix() { return prix; }
    public void setPrix(java.math.BigDecimal prix) { this.prix = prix; }

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

    public Categorie getCategorie() { return categorie; }
    public void setCategorie(Categorie categorie) { this.categorie = categorie; }

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

    public Boolean getObligatoire() { return obligatoire; }
    public void setObligatoire(Boolean obligatoire) { this.obligatoire = obligatoire; }
}
