/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cosmodas.EntCosmos;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author obper
 */
@Entity
@XmlRootElement
@NamedQueries({
        @NamedQuery(name = "Tofertas.findAll", query = "SELECT t FROM Tofertas t")
        , @NamedQuery(name = "Tofertas.findByProductoCodigo", query = "SELECT t FROM Tofertas t WHERE t.productoCodigo = :productoCodigo")
        , @NamedQuery(name = "Tofertas.findByCantidad", query = "SELECT t FROM Tofertas t WHERE t.cantidad = :cantidad")
        , @NamedQuery(name = "Tofertas.findBySucursalCodigo", query = "SELECT t FROM Tofertas t WHERE t.sucursalCodigo = :sucursalCodigo")
        , @NamedQuery(name = "Tofertas.findByProgramaCodigo", query = "SELECT t FROM Tofertas t WHERE t.programaCodigo = :programaCodigo")})
public class Tofertas implements Serializable {

    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 5)
    @Column(name = "producto_codigo")
    private String productoCodigo;
    private BigInteger cantidad;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "sucursal_codigo")
    private String sucursalCodigo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 3)
    @Column(name = "programa_codigo")
    private String programaCodigo;
    @Id
    private Long id;

    public Tofertas() {
    }

    public String getProductoCodigo() {
        return productoCodigo;
    }

    public void setProductoCodigo(String productoCodigo) {
        this.productoCodigo = productoCodigo;
    }

    public BigInteger getCantidad() {
        return cantidad;
    }

    public void setCantidad(BigInteger cantidad) {
        this.cantidad = cantidad;
    }

    public String getSucursalCodigo() {
        return sucursalCodigo;
    }

    public void setSucursalCodigo(String sucursalCodigo) {
        this.sucursalCodigo = sucursalCodigo;
    }

    public String getProgramaCodigo() {
        return programaCodigo;
    }

    public void setProgramaCodigo(String programaCodigo) {
        this.programaCodigo = programaCodigo;
    }

    public Long getId() {
        return id;
    }

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

}
