/*
 * 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.catalog;

import com.arrebol.taxiservicios.model.core.User;
import com.arrebol.taxiservicios.model.enums.PeriodoPago;
import com.arrebol.taxiservicios.model.enums.PolizaType;
import java.util.Date;
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 org.hibernate.annotations.GenericGenerator;

/**
 *
 * @author Picasso
 */
@Entity
@Table(name = "tipo_poliza")
public class TipoPoliza {
    
     private static final long serialVersionUID = -6653037938225719593L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid2")
    @Column(name = "id", length = 36)
    private String id;
    
    @Column(name = "name", nullable = true)
    private String name;
    
    @Column(name = "costo", nullable = true)
    private Double costo;
    
    @Column(name = "costo_semestral", nullable = true)
    private Double costoSemestral;
    
    @Column(name = "costo_trimestral", nullable = true)
    private Double costoTrimestral;
    
    @Column(name = "costo_mensual", nullable = true)
    private Double costoMensual;
    
    @Enumerated(EnumType.STRING)
    @Column(name = "tipo", nullable = true)
    private PolizaType tipo;
    
    @Column(name = "active", nullable = true)
    private boolean active;
    
    @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 String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    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 Double getCosto() {
        return costo;
    }

    public void setCosto(Double costo) {
        this.costo = costo;
    }

    public PolizaType getTipo() {
        return tipo;
    }

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

    public Double getCostoSemestral() {
        return costoSemestral;
    }

    public void setCostoSemestral(Double costoSemestral) {
        this.costoSemestral = costoSemestral;
    }

    public Double getCostoTrimestral() {
        return costoTrimestral;
    }

    public void setCostoTrimestral(Double costoTrimestral) {
        this.costoTrimestral = costoTrimestral;
    }

    public Double getCostoMensual() {
        return costoMensual;
    }

    public void setCostoMensual(Double costoMensual) {
        this.costoMensual = costoMensual;
    }

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

    public TipoPoliza() {
    }
    
    
}
