package ec.edu.espe.movilidad.MovilidadWS.Model; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Getter; import lombok.Setter; import javax.persistence.*; import java.util.LinkedHashSet; import java.util.Set; @Getter @Setter @Entity @Table(name = "uzytplanificacion", schema = "UTIC1") public class ModelUzyTPlanificacion { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "uzytplanificacion_id_seq") @SequenceGenerator(name = "uzytplanificacion_id_seq", sequenceName = "SEQ_UZYTPLANIFICACION", allocationSize = 1) @Column(name = "uzytplanificacion_id") private Integer uzytplanificacionId; @Column(name = "uzytplanificacionnombre", nullable = false) private String uzytplanificacionNombre; @Column(name = "uzytplanificacionnombre_largo") private String uzytplanificacionNombreLargo; //RELACIÓN CON LA TABLA CANTON-TABLA HIJA @JsonIgnore @OneToMany(mappedBy = "uzytplanificacion") private Set<ModelUzyTCanton> modelUzyTCantonSet = new LinkedHashSet<>(); }