/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.crov.prase.model.prase;

import com.arrebol.taxiservicios.model.catalog.Location;
import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.GenericEnumType;
import com.arrebol.taxiservicios.model.enums.TipoCobertura;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.hibernate.annotations.GenericGenerator;

/**
 *
 * @author Crov
 */
@Entity
@Table(name = "coberturas")
public class Coberturas implements Serializable {

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid2")
    @Column(name = "id", length = 36)
    private String id;

    @Enumerated(EnumType.STRING)
    @Column(name = "estatus_activo", nullable = false)
    private GenericEnumType estatusActivo;

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_paquetes_cobertura",
            referencedColumnName = "id",
            nullable = false
    )
    private PaquetesCobertura paquete;

    @Column(name = "descripcion", nullable = true)
    private String descripcion;

    @Column(name = "suma_asegurada", nullable = true)
    private String sumaAsegurada;

    @Column(name = "suma_editable", nullable = true)
    private Boolean sumaEditable;

    @Column(name = "suma_amparada", nullable = true)
    private Boolean sumaAmparada;

    @Column(name = "deducible", nullable = true)
    private String deducible;

    @Column(name = "prima", nullable = true)
    private Double prima;

    @Enumerated(EnumType.STRING)
    @Column(name = "tipo", nullable = false)
    private TipoCobertura tipo;

    @Transient
    private List<String> listSumasAseguradasOP;

    @Transient
    private List<String> listDeduciblesOP;

    @Transient
    private String selectSumaAsegurada;

    @Transient
    private String selectDeducible;

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "created_by",
            referencedColumnName = "id",
            nullable = false
    )
    private User createdBy;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "created_on", length = 19)
    private Date createdOn;

    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    @JoinColumn(
            name = "last_updated_by",
            referencedColumnName = "id",
            nullable = true
    )
    private User lastUpdatedBy;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "last_updated_on", length = 19, nullable = true)
    private Date lastUpdatedOn;

    public Coberturas() {
    }

    public Coberturas(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public GenericEnumType getEstatusActivo() {
        return estatusActivo;
    }

    public void setEstatusActivo(GenericEnumType estatusActivo) {
        this.estatusActivo = estatusActivo;
    }

    public PaquetesCobertura getPaquete() {
        return paquete;
    }

    public void setPaquete(PaquetesCobertura paquete) {
        this.paquete = paquete;
    }

    public TipoCobertura getTipo() {
        return tipo;
    }

    public void setTipo(TipoCobertura tipo) {
        this.tipo = tipo;
    }

    public String getSumaAsegurada() {
        return sumaAsegurada;
    }

    public void setSumaAsegurada(String sumaAsegurada) {
        this.sumaAsegurada = sumaAsegurada;
    }

    public Boolean getSumaEditable() {
        return sumaEditable;
    }

    public void setSumaEditable(Boolean sumaEditable) {
        this.sumaEditable = sumaEditable;
    }

    public Boolean getSumaAmparada() {
        return sumaAmparada;
    }

    public void setSumaAmparada(Boolean sumaAmparada) {
        this.sumaAmparada = sumaAmparada;
    }

    public Double getPrima() {
        return prima;
    }

    public void setPrima(Double prima) {
        this.prima = prima;
    }

    public User getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(User createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }

    public User getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(User lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Date getLastUpdatedOn() {
        return lastUpdatedOn;
    }

    public void setLastUpdatedOn(Date lastUpdatedOn) {
        this.lastUpdatedOn = lastUpdatedOn;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public String getDeducible() {
        return deducible;
    }

    public void setDeducible(String deducible) {
        this.deducible = deducible;
    }

    public List<String> getListSumasAseguradasOP() {
        return listSumasAseguradasOP;
    }

    public void setListSumasAseguradasOP(List<String> listSumasAseguradasOP) {
        this.listSumasAseguradasOP = listSumasAseguradasOP;
    }

    public List<String> getListDeduciblesOP() {
        return listDeduciblesOP;
    }

    public void setListDeduciblesOP(List<String> listDeduciblesOP) {
        this.listDeduciblesOP = listDeduciblesOP;
    }

    public String getSelectSumaAsegurada() {
        return selectSumaAsegurada;
    }

    public void setSelectSumaAsegurada(String selectSumaAsegurada) {
        this.selectSumaAsegurada = selectSumaAsegurada;
    }

    public String getSelectDeducible() {
        return selectDeducible;
    }

    public void setSelectDeducible(String selectDeducible) {
        this.selectDeducible = selectDeducible;
    }

}
