package fr.marouse.entity;

import java.util.List;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;

@Entity
@Table(name = "Agence")
public class Agence {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int numAgence;

    @Column(nullable = false)
    private String telAgence;

    @Column(nullable = false)
    private String adAgence;

    @OneToMany(mappedBy = "agence")
    private List<Agent> agents;

    public Agence() {}
    public Agence(String telAgence, String adAgence) {
        this.telAgence = telAgence;
        this.adAgence = adAgence;
    }

    public int getNumAgence() {
        return numAgence;
    }

    public void setNumAgence(int numAgence) {
        this.numAgence = numAgence;
    }

    public String getTelAgence() {
        return telAgence;
    }

    public void setTelAgence(String telAgence) {
        this.telAgence = telAgence;
    }

    public String getAdAgence() {
        return adAgence;
    }

    public void setAdAgence(String adAgence) {
        this.adAgence = adAgence;
    }

    public List<Agent> getAgents() {
        return agents;
    }

    public void setAgents(List<Agent> agents) {
        this.agents = agents;
    }
}