package com.rjconsultores.ventaboletos.entidad;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "CAJA_FORMAPAGO")
public class CajaFormaPago implements java.io.Serializable {

	private static final long serialVersionUID = -2927885703968812837L;

	@Id
	@Column(name = "CAJAFORMAPAGO_ID", unique = true, nullable = false, precision = 15, scale = 0)
	private Long cajaFormaPagoId;

	@ManyToOne
	@JoinColumn(name = "CAJA_ID")
	private Caja caja;

	@ManyToOne
	@JoinColumn(name = "FORMAPAGO_ID")
	private FormaPago formapago;

	@Column(name = "IMPORTE", precision = 8)
	private BigDecimal importe;

	@Column(name = "INDREPLICA", precision = 1, scale = 0)
	private Boolean indreplica;

	@Column(name = "ACTIVO", precision = 1, scale = 0)
	private Boolean activo;

	@Temporal(TemporalType.DATE)
	@Column(name = "FECMODIF", length = 7)
	private Date fecmodif;

	@Column(name = "USUARIO_ID", precision = 7, scale = 0)
	private Integer usuarioId;

	@Column(name = "NODO_ID", precision = 2, scale = 0)
	private Byte nodoId;

	@OneToOne(mappedBy = "cajaFormaPago")
	private CajaDetPago cajaDetPago;
	
	public Long getCajaFormaPagoId() {
		return cajaFormaPagoId;
	}

	public void setCajaFormaPagoId(Long cajaFormaPagoId) {
		this.cajaFormaPagoId = cajaFormaPagoId;
	}

	public Caja getCaja() {
		return caja;
	}

	public void setCaja(Caja caja) {
		this.caja = caja;
	}

	public FormaPago getFormapago() {
		return formapago;
	}

	public void setFormapago(FormaPago formapago) {
		this.formapago = formapago;
	}

	public BigDecimal getImporte() {
		return importe;
	}

	public void setImporte(BigDecimal importe) {
		this.importe = importe;
	}

	public Boolean getIndreplica() {
		return indreplica;
	}

	public void setIndreplica(Boolean indreplica) {
		this.indreplica = indreplica;
	}

	public Boolean getActivo() {
		return activo;
	}

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

	public Date getFecmodif() {
		return fecmodif;
	}

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

	public Integer getUsuarioId() {
		return usuarioId;
	}

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

	public Byte getNodoId() {
		return nodoId;
	}

	public void setNodoId(Byte nodoId) {
		this.nodoId = nodoId;
	}

	public CajaDetPago getCajaDetPago() {
		return cajaDetPago;
	}

	public void setCajaDetPago(CajaDetPago cajaDetPago) {
		this.cajaDetPago = cajaDetPago;
	}

}
