39 lines
1019 B
Java
39 lines
1019 B
Java
package io.gmss.infocad.entities.decoupage;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import io.gmss.infocad.entities.BaseEntity;
|
|
import io.gmss.infocad.entities.infocad.parametre.Personne;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.NoArgsConstructor;
|
|
import org.hibernate.annotations.Where;
|
|
|
|
import javax.persistence.*;
|
|
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;
|
|
@ManyToOne
|
|
private Departement departement;
|
|
@JsonIgnore
|
|
@OneToMany(mappedBy = "commune")
|
|
private List<Arrondissement> arrondissements;
|
|
@JsonIgnore
|
|
@OneToMany(mappedBy = "commune")
|
|
private List<Personne> personnes;
|
|
|
|
}
|