/**
 * 
 */
package com.rjconsultores.ventaboletos.entidad;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author Thiago
 *
 */
@Entity
@Table(name = "OCD_PTOVTA_PARAM")
public class OCDPtoVtaParam {

	private Long ocdPtoVtaParamId;
	private OCDParam ocdParam;
	private Boolean activo;
	private Date fecmodif;
	private Integer usuarioId;
	private PuntoVenta puntoventa;
	
	@SequenceGenerator(name = "OCD_PTOVTA_PARAM_SEQ", sequenceName = "OCD_PTOVTA_PARAM_SEQ", allocationSize = 1)
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "OCD_PTOVTA_PARAM_SEQ")
	@Column(name = "OCDPTOVTAPARAM_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getOcdPtoVtaParamId() {
		return ocdPtoVtaParamId;
	}

	public void setOcdPtoVtaParamId(Long ocdPtoVtaParamId) {
		this.ocdPtoVtaParamId = ocdPtoVtaParamId;
	}

	@JoinColumn(name = "OCDPARAM_ID", referencedColumnName="OCDPARAM_ID")
	@ManyToOne
	public OCDParam getOcdParam() {
		return ocdParam;
	}

	public void setOcdParam(OCDParam ocdParam) {
		this.ocdParam = ocdParam;
	}
	@Column(name = "ACTIVO", precision = 1, scale = 0)
	public Boolean getActivo() {
		return activo;
	}

	public void setActivo(Boolean activo) {
		this.activo = activo;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FECMODIF", length = 7)
	public Date getFecmodif() {
		return fecmodif;
	}

	public void setFecmodif(Date fecmodif) {
		this.fecmodif = fecmodif;
	}

	@Column(name = "USUARIO_ID", precision = 7, scale = 0)
	public Integer getUsuarioId() {
		return usuarioId;
	}

	public void setUsuarioId(Integer usuarioId) {
		this.usuarioId = usuarioId;
	}

	@JoinColumn(name = "PUNTOVENTA_ID")
	@ManyToOne
	public PuntoVenta getPuntoventa() {
		return puntoventa;
	}

	public void setPuntoventa(PuntoVenta puntoventa) {
		this.puntoventa = puntoventa;
	}

}
