/*
 * 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 = "vZonas")
@XmlRootElement
@NamedQueries({
        @NamedQuery(name = "VZonas.findAll", query = "SELECT v FROM VZonas v"),
        @NamedQuery(name = "VZonas.findById", query = "SELECT v FROM VZonas v WHERE v.id = :id"),
        @NamedQuery(name = "VZonas.findBySucursalCodigo", query = "SELECT v FROM VZonas v WHERE v.sucursalCodigo = :sucursalCodigo ORDER BY v.zona ASC"),
        @NamedQuery(name = "VZonas.findByZona", query = "SELECT v FROM VZonas v WHERE v.zona = :zona")})
public class VZonas implements Serializable {

    private static final long serialVersionUID = 1L;
    @Size(max = 23)
    @Column(name = "id")
    @Id
    private String id;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "sucursal_codigo")
    private String sucursalCodigo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 20)
    @Column(name = "zona")
    private String zona;

    public VZonas() {
    }

    public String getId() {
        return id;
    }

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

    public String getSucursalCodigo() {
        return sucursalCodigo;
    }

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

    public String getZona() {
        return zona;
    }

    public void setZona(String zona) {
        this.zona = zona;
    }

}
