/*
 * 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.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author obper
 */
@Entity
@Table(name = "Tcompras")
@XmlRootElement
@NamedQueries({
        @NamedQuery(name = "Tcompras.findAll", query = "SELECT t FROM Tcompras t")
        , @NamedQuery(name = "Tcompras.findById", query = "SELECT t FROM Tcompras t WHERE t.id = :id")
        , @NamedQuery(name = "Tcompras.findMultiple", query = "SELECT t FROM Tcompras t WHERE t.productoCodigo = :productoCodigo AND t.programaCodigo = :programaCodigo")
        , @NamedQuery(name = "Tcompras.findByProductoCodigo", query = "SELECT t FROM Tcompras t WHERE t.productoCodigo = :productoCodigo")
        , @NamedQuery(name = "Tcompras.findByCantidad", query = "SELECT t FROM Tcompras t WHERE t.cantidad = :cantidad")
        , @NamedQuery(name = "Tcompras.findByProgramaCodigo", query = "SELECT t FROM Tcompras t WHERE t.programaCodigo = :programaCodigo")})
public class Tcompras implements Serializable {

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

    public Tcompras() {
    }

    public String getId() {
        return id;
    }

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

    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 getProgramaCodigo() {
        return programaCodigo;
    }

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

}
