ModelUzyTPlanificacion.java 1.03 KB
Newer Older
1
package ec.edu.espe.movilidad.MovilidadWS.Model;
2 3

import com.fasterxml.jackson.annotation.JsonIgnore;
4 5
import lombok.Getter;
import lombok.Setter;
6 7

import javax.persistence.*;
8
import java.util.LinkedHashSet;
9 10
import java.util.Set;

11 12
@Getter
@Setter
13 14 15 16
@Entity
@Table(name = "uzytplanificacion", schema = "UTIC1")
public class ModelUzyTPlanificacion {
    @Id
17 18 19
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "uzytplanificacion_id_seq")
    @SequenceGenerator(name = "uzytplanificacion_id_seq", sequenceName = "SEQ_UZYTPLANIFICACION", allocationSize = 1)

20 21 22 23 24 25 26 27 28 29 30 31
    @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
32
    @OneToMany(mappedBy = "uzytplanificacion")
33
    private Set<ModelUzyTCanton> modelUzyTCantonSet = new LinkedHashSet<>();
34
}