package com.astalange.core.entity;

import jakarta.persistence.*;
import java.math.BigDecimal;
import java.time.LocalDate;

@Entity
@Table(name = "paiement")
public class Paiement {

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

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

    @Column(nullable = false, precision = 10, scale = 2)
    private BigDecimal montant;

    @Column(name = "date_paiement", nullable = false)
    private LocalDate datePaiement;

    @ManyToOne(optional = false)
    @JoinColumn(name = "mode_paiement_id", nullable = false)
    private ModePaiement modePaiement;

    @Column(name = "gestionnaire")
    private String gestionnaire;

    // 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 BigDecimal getMontant() { return montant; }
    public void setMontant(BigDecimal montant) { this.montant = montant; }

    public LocalDate getDatePaiement() { return datePaiement; }
    public void setDatePaiement(LocalDate datePaiement) { this.datePaiement = datePaiement; }

    public ModePaiement getModePaiement() { return modePaiement; }
    public void setModePaiement(ModePaiement modePaiement) { this.modePaiement = modePaiement; }

    public String getGestionnaire() { return gestionnaire; }
    public void setGestionnaire(String gestionnaire) { this.gestionnaire = gestionnaire; }
}
