package com.uas.platform.b2b.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;

import com.alibaba.fastjson.annotation.JSONField;

@Table(name = "bar$labelprintsetting")
@Entity
public class BarLabelPrintSetting implements Serializable{
	
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 主键ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "lps_id")
	private Long id;
	
	@ManyToOne(cascade = CascadeType.ALL, optional = true)
	@JoinColumn(name = "lps_laid", nullable = false)
	private BarLabel label;
	
	@Column(name = "lps_lacode")
	private String lacode;
	
	@Column(name = "lps_caller")
	private String caller;
	
	@Column(name = "lps_sql", length = 1000)
	private String sql;
	
	@Column(name = "lps_laname")
	private String laname;

	public Long getId() {
		return id;
	}

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

	public String getLacode() {
		return lacode;
	}

	public void setLacode(String lacode) {
		this.lacode = lacode;
	}

	public String getCaller() {
		return caller;
	}

	public void setCaller(String caller) {
		this.caller = caller;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public String getLaname() {
		return laname;
	}

	public void setLaname(String laname) {
		this.laname = laname;
	}

	/**
	 * @return the label
	 */
	@JsonIgnore
	@JSONField(serialize = false)
	public BarLabel getLabel() {
		return label;
	}

	/**
	 * @param label the label to set
	 */
	public void setLabel(BarLabel label) {
		this.label = label;
	}

	
}
