package io.gmss.fiscad.entities.decoupage;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.infocad.parametre.Personne;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import java.io.Serializable;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Where(clause = " deleted = false")
public class Commune extends BaseEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String code;
    private String nom;
    private String longitude;
    private String latitude;
    @ManyToOne
    private Departement departement;
//    @JsonIgnore
//    @OneToMany(mappedBy = "commune")
//    private List<Arrondissement> arrondissements;
//    @JsonIgnore
//    @OneToMany(mappedBy = "commune")
//    private List<Personne> personnes;

}
