package com.uas.search.console.b2b.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 委外变更单（作为变更明细的从表，因为可能一条对应多条明细，而明细只对应一条委外变更单记录）
 * 
 * @author suntg
 * @since 2015年8月6日下午2:18:11
 */
@Table(name = "MAKE$CHANGES")
@Entity
public class MakeChangesSimpleInfo {


	@Id
	@Column(name = "mc_id")
	private Long id;

	/**
	 * 日期
	 */
	@Column(name = "mc_indate")
	private Date date;

	/**
	 * 采购变更单所属企业(客户)
	 */
	@OneToOne
	@JoinColumn(name = "mc_enuu", insertable = false, updatable = false)
	private EnterpriseSimpleInfo enterprise;

	/**
	 * 采购变更单号
	 */
	@Column(name = "mc_code")
	private String code;


	public Long getId() {
		return id;
	}

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

	public EnterpriseSimpleInfo getEnterprise() {
		return enterprise;
	}

	public void setEnterprise(EnterpriseSimpleInfo enterprise) {
		this.enterprise = enterprise;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}


	@Override
	public String toString() {
		return "MakeChangesSimpleInfo [id=" + id + ", date=" + date + ", enterprise=" + enterprise + ", code=" + code
				+ "]";
	}

}