/*
 * 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.core.User;
import com.arrebol.taxiservicios.model.enums.BasicType;
import com.arrebol.taxiservicios.model.enums.Riesgo;
import com.crov.prase.model.catalog.Hospitales;
import java.io.Serializable;
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 Crov
 */
@Entity
@Table(name = "incidence_damage")
public class IncidenceDamage implements Serializable {

    private static final long serialVersionUID = -6653037938225719593L;

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

    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    @JoinColumn(
            name = "id_incidence",
            referencedColumnName = "id",
            nullable = false
    )
    private Incidence incidence;

    @ManyToOne(fetch = FetchType.LAZY, optional = true)
    @JoinColumn(
            name = "id_hospital",
            referencedColumnName = "id",
            nullable = true
    )
    private Hospitales hospital;

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

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

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

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

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

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

    @Enumerated(EnumType.STRING)
    @Column(name = "pase_medico", nullable = false)
    private BasicType paseMedico;

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

    @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 IncidenceDamage() {
    }

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

    public String getId() {
        return id;
    }

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

    public Incidence getIncidence() {
        return incidence;
    }

    public void setIncidence(Incidence incidence) {
        this.incidence = incidence;
    }

    public Hospitales getHospital() {
        return hospital;
    }

    public void setHospital(Hospitales hospital) {
        this.hospital = hospital;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getEdad() {
        return edad;
    }

    public void setEdad(String edad) {
        this.edad = edad;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getTelefono() {
        return telefono;
    }

    public void setTelefono(String telefono) {
        this.telefono = telefono;
    }

    public String getLesionesSufridad() {
        return lesionesSufridad;
    }

    public void setLesionesSufridad(String lesionesSufridad) {
        this.lesionesSufridad = lesionesSufridad;
    }

    public BasicType getAmbulancia() {
        return ambulancia;
    }

    public void setAmbulancia(BasicType ambulancia) {
        this.ambulancia = ambulancia;
    }

    public BasicType getPaseMedico() {
        return paseMedico;
    }

    public void setPaseMedico(BasicType paseMedico) {
        this.paseMedico = paseMedico;
    }

    public Riesgo getRiesgo() {
        return riesgo;
    }

    public void setRiesgo(Riesgo riesgo) {
        this.riesgo = riesgo;
    }

    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 getCorreo() {
        return correo;
    }

    public void setCorreo(String correo) {
        this.correo = correo;
    }
    
    

}
