package com.uas.platform.b2b.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 邀请合作伙伴注册
 * 
 * @author hejq
 * @time 创建时间：2017年4月19日
 */
@Table(name = "invitationrecords")
@Entity
public class InvitationRecord implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "in_id")
	private Long id;
	
	/**
	 * 邀请企业uu
	 */
	@Column(name = "in_enuu")
	private Long enuu;
	
	/**
	 * 邀请企业营业执照
	 */
	@Column(name = "in_bussinesscode")
	private String bussinesscode;

	/**
	 * 用户uu
	 */
	@Column(name = "in_useruu")
	private Long useruu;

	/**
	 * 邀请人
	 */
	@OneToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
	@JoinColumn(name = "in_useruu", insertable = false, updatable = false)
	private UserBaseInfo user;

	/**
	 * 邀请人联系方式
	 */
	@Column(name = "in_usertel")
	private String userTel;
	
	/**
	 * 最后一次邀请时间
	 */
	@Column(name = "in_date")
	private Date date;

	/**
	 * 被邀请的客户名称
	 */
	@Column(name = "in_vendname")
	private String vendname;

	/**
	 * 被邀请的用户名称
	 */
	@Column(name = "in_vendusername")
	private String vendusername;

	/**
	 * 被邀请的用户的电话
	 */
	@Column(name = "in_vendusertel")
	private String vendusertel;

	/**
	 * 被邀请的用户的邮箱
	 */
	@Column(name = "in_venduseremail")
	private String venduseremail;

	/**
	 * 可能出现重复邀请的情况，记录邀请次数
	 */
	@Column(name = "in_count")
	private Integer count;

	/**
	 * 是否已激活
	 */
	@Column(name = "in_active")
	private Short active;

	/**
	 * 相同名称企业的数量
	 */
	@Column(name = "in_samecount")
	private Integer samecount;

	/**
	 * 企业uu(如果有相同名称的设置方便查询）
	 */
	@Column(name = "in_venduu")
	private Long venduu;

	/**
	 * 邀请来源
	 */
	@Column(name = "in_source")
	private String source;

	/**
	 * 邀请状态
	 */
	@Column(name = "in_status")
	private Integer status;

	/**
	 * erp数据传入时间
	 *
	 * @return
	 */
	@Column(name = "in_erpdate")
	private Date erpdate;

	/**
	 * 物料上传数量
	 */
	@Transient
	private Long productNum;

	/**
	 * 如果企业注册，展示注册时间
	 */
	@Transient
	private Date registerDate;

	/**
	 * 邀请注册的人，记录是从哪个链接去注册的
	 */
	@Transient
	private String inviteUserName;

	/**
	 * 邀请注册的企业，记录是从哪个链接去注册的
	 */
	@Transient
	private String inviteEnName;

    /**
     * 地址
     */
	@Transient
    private String enAddress;

    /**
     * 法人
     */
	@Transient
    private String enCorporation;

    /**
     * 管理员姓名
     */
	@Transient
    private String adminName;

    /**
     * 企业电话
     */
	@Transient
    private String enTel;

	public Long getId() {
		return id;
	}

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

	public Long getEnuu() {
		return enuu;
	}

	public void setEnuu(Long enuu) {
		this.enuu = enuu;
	}

	public String getBussinesscode() {
		return bussinesscode;
	}

	public void setBussinesscode(String bussinesscode) {
		this.bussinesscode = bussinesscode;
	}

	public Long getUseruu() {
		return useruu;
	}

	public void setUseruu(Long useruu) {
		this.useruu = useruu;
	}

    public String getUserTel() {
        return userTel;
    }

    public void setUserTel(String userTel) {
        this.userTel = userTel;
    }

    public Date getDate() {
		return date;
	}

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

	public String getVendname() {
		return vendname;
	}

	public void setVendname(String vendname) {
		this.vendname = vendname;
	}

	public String getVendusertel() {
		return vendusertel;
	}

	public void setVendusertel(String vendusertel) {
		this.vendusertel = vendusertel;
	}

	public String getVenduseremail() {
		return venduseremail;
	}

	public void setVenduseremail(String venduseremail) {
		this.venduseremail = venduseremail;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public String getVendusername() {
		return vendusername;
	}

	public void setVendusername(String vendusername) {
		this.vendusername = vendusername;
	}

	public Short getActive() {
		return active;
	}

	public void setActive(Short active) {
		this.active = active;
	}

	public Integer getSamecount() {
		return samecount;
	}

	public void setSamecount(Integer samecount) {
		this.samecount = samecount;
	}

	public Long getVenduu() {
		return venduu;
	}

	public void setVenduu(Long venduu) {
		this.venduu = venduu;
	}

	public UserBaseInfo getUser() {
		return user;
	}

	public void setUser(UserBaseInfo user) {
		this.user = user;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getErpdate() {
		return erpdate;
	}

	public void setErpdate(Date erpdate) {
		this.erpdate = erpdate;
	}

	public Long getProductNum() {
		return productNum;
	}

	public void setProductNum(Long productNum) {
		this.productNum = productNum;
	}

    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

	public String getInviteUserName() {
		return inviteUserName;
	}

	public void setInviteUserName(String inviteUserName) {
		this.inviteUserName = inviteUserName;
	}

	public String getInviteEnName() {
		return inviteEnName;
	}

	public void setInviteEnName(String inviteEnName) {
		this.inviteEnName = inviteEnName;
	}

    public String getEnAddress() {
        return enAddress;
    }

    public void setEnAddress(String enAddress) {
        this.enAddress = enAddress;
    }

    public String getEnCorporation() {
        return enCorporation;
    }

    public void setEnCorporation(String enCorporation) {
        this.enCorporation = enCorporation;
    }

    public String getAdminName() {
        return adminName;
    }

    public void setAdminName(String adminName) {
        this.adminName = adminName;
    }

    public String getEnTel() {
        return enTel;
    }

    public void setEnTel(String enTel) {
        this.enTel = enTel;
    }
}
