/*
 * 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 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 = "vCompra")
@XmlRootElement
@NamedQueries({
        @NamedQuery(name = "VCompra.findAll", query = "SELECT v FROM VCompra v")
        , @NamedQuery(name = "VCompra.findByCompraCodigo", query = "SELECT v FROM VCompra v WHERE v.compraCodigo = :compraCodigo")
        , @NamedQuery(name = "VCompra.findByFecha", query = "SELECT v FROM VCompra v WHERE v.fecha = :fecha")
        , @NamedQuery(name = "VCompra.findByCantidad", query = "SELECT v FROM VCompra v WHERE v.cantidad = :cantidad")})
public class VCompra implements Serializable {

    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 6)
    @Column(name = "compra_codigo")
    @Id
    private String compraCodigo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "fecha")
    private String fecha;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 7)
    @Column(name = "cantidad")
    private String cantidad;

    public VCompra() {
    }

    public String getCompraCodigo() {
        return compraCodigo;
    }

    public void setCompraCodigo(String compraCodigo) {
        this.compraCodigo = compraCodigo;
    }

    public String getFecha() {
        return fecha;
    }

    public void setFecha(String fecha) {
        this.fecha = fecha;
    }

    public String getCantidad() {
        return cantidad;
    }

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

}
