38 lines
1007 B
Java
38 lines
1007 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.Bloc;
|
|
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 Arrondissement extends BaseEntity implements Serializable {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
private String code;
|
|
private String nom;
|
|
@ManyToOne
|
|
private Commune commune;
|
|
@JsonIgnore
|
|
@OneToMany(mappedBy = "arrondissement")
|
|
private List<Quartier> quartiers;
|
|
@JsonIgnore
|
|
@OneToMany(mappedBy = "arrondissement")
|
|
private List<Bloc> blocs;
|
|
}
|