package com.uas.platform.b2b.model;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 *  用于招标中的企业基本信息
 * Created by dongbw on 17/03/07 11:50.
 */

@Table(name = "sec$enterprisebaseinfo")
@Entity
public class EnterpriseBaseInfo implements Serializable {

    /**
     * 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * 企业uu
     */
    @Id
    @Column(name = "en_uu")
    private Long uu;

    /**
     * 公司名称
     */
    @NotNull
    @Column(name = "en_name")
    private String enName;

    /**
     * 注册地址
     */
    @Column(name = "en_address")
    private String enAddress;

    /**
     * 企业执照号
     */
    @Column(name = "en_businesscode")
    private String enBusinessCode;

    /**
     * 成立时间
     */
    @Column(name = "en_establishdate")
    private Date enEstablishDate;

    /**
     * 员工人数
     */
    @Column(name = "en_emnum")
    private Long emNum;

    /**
     * 公司电话
     */
    @Column(name = "en_tel")
    private String enTel;
    /**
     * 传真
     */
    @Column(name = "en_fax")
    private String enFax;

    /**
     * 联系人（暂时设置为企业系统管理员）
     */
    @Column(name = "en_user")
    private String enUser;

    /**
     * 联系人电话
     */
    @Column(name = "en_usertel")
    private String userTel;

    /**
     * 开户行
     */
    @Column(name = "en_bank")
    private String bank;

    /**
     * 经营范围
     */
    @Column(name = "en_scope")
    private String scope;

    /**
     * 备注
     */
    @Column(name = "en_remark")
    private String remark;

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

    /**
     * 注册时间
     */
    @Transient
    private Date date;

    /**
     * 邀请企业名称
     */
    @Transient
    private String inviteEnName;

    /**
     * 邀请用户名
     */
    @Transient
    private String inviteUserName;

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

    public EnterpriseBaseInfo(Long uu, String enBusinessCode, String enName, String enAddress) {
        this.uu = uu;
        this.enBusinessCode = enBusinessCode;
        this.enName = enName;
        this.enAddress = enAddress;
    }

    public EnterpriseBaseInfo() {
    }

    public Long getUu() {
        return uu;
    }

    public void setUu(Long uu) {
        this.uu = uu;
    }

    public String getEnName() {
        return enName;
    }

    public void setEnName(String enName) {
        this.enName = enName;
    }

    public String getEnAddress() {
        return enAddress;
    }

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

    public String getEnBusinessCode() {
        return enBusinessCode;
    }

    public void setEnBusinessCode(String enBusinessCode) {
        this.enBusinessCode = enBusinessCode;
    }

    public Date getEnEstablishDate() {
        return enEstablishDate;
    }

    public void setEnEstablishDate(Date enEstablishDate) {
        this.enEstablishDate = enEstablishDate;
    }

    public Long getEmNum() {
        return emNum;
    }

    public void setEmNum(Long emNum) {
        this.emNum = emNum;
    }

    public String getEnTel() {
        return enTel;
    }

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

    public String getEnFax() {
        return enFax;
    }

    public void setEnFax(String enFax) {
        this.enFax = enFax;
    }

    public String getEnUser() {
        return enUser;
    }

    public void setEnUser(String enUser) {
        this.enUser = enUser;
    }

    public String getUserTel() {
        return userTel;
    }

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

    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getInviteEnName() {
        return inviteEnName;
    }

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

    public String getInviteUserName() {
        return inviteUserName;
    }

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

    public String getAdminName() {
        return adminName;
    }

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

    public EnterpriseBaseInfo(Enterprise e) {
        this.enName = e.getEnName();
        this.uu = e.getUu();
        this.enAddress = e.getEnAddress();
        this.enTel = e.getEnTel();
        this.date = e.getEnDate();
        this.enCorporation = e.getEnCorporation();
        this.enEstablishDate = e.getEnDate();
    }
}
