package com.rjconsultores.ventaboletos.entidad;

// Generated 26/10/2013 14:51:58 by Hibernate Tools 3.4.0.CR1

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
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;

/**
 * AbastoCentral generated by hbm2java
 */
@Entity
@Table(name = "CTRL_EST_MIGRACAO")
public class ControleEstoqueMigracao implements java.io.Serializable {

	private Long ctrlestmigracaoId;	
	private PuntoVenta puntoventa;	
	private Date fecmodif;
	private Integer usuarioId;
	
	public ControleEstoqueMigracao() {
	}

	public ControleEstoqueMigracao(PuntoVenta _puntoventa, Date _fecmodif, Integer _usuarioId) {		
		puntoventa = _puntoventa;		
		fecmodif = _fecmodif;
		usuarioId = _usuarioId;
	}
	
	@JoinColumn(name = "PUNTOVENTA_ID")
	@ManyToOne
	public PuntoVenta getPuntoventa() {
		return this.puntoventa;
	}

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

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

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

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

	public void setUsuarioId(Integer usuarioId) {
		this.usuarioId = usuarioId;
	}
	
	@SequenceGenerator(name = "CTRL_EST_MIGRACAO_SEQ", sequenceName = "CTRL_EST_MIGRACAO_SEQ", allocationSize = 1)
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "CTRL_EST_MIGRACAO_SEQ")
	@Column(name = "CTRLESTMIGRACAO_ID", unique = true, nullable = false, precision = 15, scale = 0)
	public Long getCtrlestmigracaoId() {
		return ctrlestmigracaoId;
	}

	public void setCtrlestmigracaoId(Long ctrlestmigracaoId) {
		this.ctrlestmigracaoId = ctrlestmigracaoId;
	}
}
