package com.ssj.bean.sys.fx.domain;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import com.ssj.bean.common.framework.core.domain.BaseEntity;


@Entity
@Table(name = "fx_device_parts")
public class DeviceParts  extends BaseEntity { 
	
    private static final long serialVersionUID = 1L;

    private String partsId;
    
    private String merchantId;

    private String posCode;

    private String orgCode;
    
    private String name;
    
    private String partsColor;
    
    private Integer sellNum;
    
    private Integer sellWaitNum;
    
    private Integer returnWaitNum;
    
    private String remarks;

    private Date updateTime;
    
    private Date createTime;

	private Merchant merchant;
	
	@OneToOne(cascade = { CascadeType.PERSIST}, fetch=FetchType.EAGER)
	@JoinColumn(name="merchantId",updatable =false,insertable =false)
	@Fetch(FetchMode.SELECT)
	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}
	
    
	public String getPartsId() {
		return partsId;
	}

	public void setPartsId(String partsId) {
		this.partsId = partsId;
	}

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	public String getPosCode() {
		return posCode;
	}

	public void setPosCode(String posCode) {
		this.posCode = posCode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getPartsColor() {
		return partsColor;
	}

	public void setPartsColor(String partsColor) {
		this.partsColor = partsColor;
	}
	public Integer getSellNum() {
		return sellNum;
	}

	public void setSellNum(Integer sellNum) {
		this.sellNum = sellNum;
	}

	public Integer getSellWaitNum() {
		return sellWaitNum;
	}

	public void setSellWaitNum(Integer sellWaitNum) {
		this.sellWaitNum = sellWaitNum;
	}

	public Integer getReturnWaitNum() {
		return returnWaitNum;
	}

	public void setReturnWaitNum(Integer returnWaitNum) {
		this.returnWaitNum = returnWaitNum;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
    
	

}
