package com.uas.account.entity;

import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

/**
 * 详细企业资料
 * 
 * <pre>
 * 应涵盖全部企业信息，满足所有应用需求
 * </pre>
 * 
 * @author yingp
 * 
 */
public class UserSpaceDetail implements Serializable {

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

	private Long id;

	private String name;

//	@NotEmpty(message = "{us.shortName.null}")
	private String shortName;

	@Length(max = 50, message = "{us.businessCode.length.illegal}")
	private String businessCode;

	private String businessCodeImage;

	private String address;
	private String province;
	private String city;
	private String district;
	private String street;
	private String corporation;
	private String fax;
	private String tel;
	private Long registerDate;
	private String type;
	private String url;
	private String area;
	private String industry;
	private String domain;
	private String inviteuid;
	private String inviteUserCode;
	private String method;

//	@NotEmpty(message = "{us.admin.name.null}")
	private String adminName;

	private String adminTel;

//	@NotEmpty(message = "{us.admin.email.null}")
	private String adminEmail;

	private Integer status;

	private Integer approveStatus;

	private String applyApps;

	private String errMsg;

	private String logoImage;

	private String checkcode;

	private String checkcodeToken;

    private String contactMan;

    private String contactTel;

    private String contactEmail;

    private String tags;

    private String profession;

    private Long uu;

    /**
	 * 注册全称
	 * 
	 * @return
	 */
	public String getName() {
		return name;
	}

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

	/**
	 * 简称
	 *
	 * @return
	 */
	public String getShortName() {
		return shortName;
	}

	public void setShortName(String shortName) {
		this.shortName = shortName;
	}

	/**
	 * 注册号
	 * 
	 * @return
	 */
	public String getBusinessCode() {
		return businessCode;
	}

	public void setBusinessCode(String businessCode) {
		this.businessCode = businessCode;
	}

	/**
	 * 注册地址
	 * 
	 * @return
	 */
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * 法人名
	 * 
	 * @return
	 */
	public String getCorporation() {
		return corporation;
	}

	public void setCorporation(String corporation) {
		this.corporation = corporation;
	}

	/**
	 * 传真
	 * 
	 * @return
	 */
	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	/**
	 * 注册（优软平台）的日期
	 * 
	 * @return
	 */
	public Long getRegisterDate() {
		return registerDate;
	}

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

	/**
	 * 企业类型
	 * 
	 * @return
	 */
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	/**
	 * 官网
	 * 
	 * @return
	 */
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * 区域
	 * 
	 * @return
	 */
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	/**
	 * 主营类型
	 * 
	 * @return
	 */
	public String getIndustry() {
		return industry;
	}

	public void setIndustry(String industry) {
		this.industry = industry;
	}

	/**
	 * （优软平台分配的）二级域名
	 * 
	 * @return
	 */
	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	/**
	 * 审核状态
	 * 
	 * @return
	 */
	public Integer getStatus() {
		return status;
	}

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

	/**
	 * 企业联系电话
	 * 
	 * @return
	 */
	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	/**
	 * 营业执照附件
	 * 
	 * @return
	 */
	public String getBusinessCodeImage() {
		return businessCodeImage;
	}

	public void setBusinessCodeImage(String businessCodeImage) {
		this.businessCodeImage = businessCodeImage;
	}

	/**
	 * 管理员名
	 *
	 * @return
	 */
	public String getAdminName() {
		return adminName;
	}

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

	/**
	 * 管理员电话
	 * 
	 * @return
	 */
	public String getAdminTel() {
		return adminTel;
	}

	public void setAdminTel(String adminTel) {
		this.adminTel = adminTel;
	}

	/**
	 * 管理员邮箱
	 *
	 * @return
	 */
	public String getAdminEmail() {
		return adminEmail;
	}

	public void setAdminEmail(String adminEmail) {
		this.adminEmail = adminEmail;
	}

	/**
	 * 申请的应用
	 * 
	 * @return
	 */
	public String getApplyApps() {
		return applyApps;
	}

	public void setApplyApps(String applyApps) {
		this.applyApps = applyApps;
	}

	/**
	 * 错误信息
	 * 
	 * @return
	 */
	public String getErrMsg() {
		return errMsg;
	}

	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}

	/**
	 * 省
	 * 
	 * @return
	 */
	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	/**
	 * 市
	 * 
	 * @return
	 */
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	/**
	 * 区
	 * 
	 * @return
	 */
	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	/**
	 * 街道
	 * 
	 * @return
	 */
	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	public UserSpace simple(App app) {
		UserSpace userSpace = new UserSpace();
		userSpace.setAppId(app.getUid());
		userSpace.setDialectUID(this.businessCode);
		userSpace.setName(this.name);
		userSpace.setUserCount(0);
		return userSpace;
	}

	/**
	 * logo图标
	 * 
	 * @return
	 */
	public String getLogoImage() {
		return logoImage;
	}

	public void setLogoImage(String logoImage) {
		this.logoImage = logoImage;
	}

	public Long getId() {
		return id;
	}

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

	/**
	 * 验证状态
	 * @return
	 */
	public Integer getApproveStatus() {
		return approveStatus;
	}

	public void setApproveStatus(Integer approveStatus) {
		this.approveStatus = approveStatus;
	}

	public String getCheckcode() {
		return checkcode;
	}

	/**
	 * 注册时的验证码，用于后端验证验证码，不做保存
	 * 
	 * @param checkcode
	 */
	public void setCheckcode(String checkcode) {
		this.checkcode = checkcode;
	}

	public String getCheckcodeToken() {
		return checkcodeToken;
	}

	/**
	 * 注册时的验证码的token，用于后端验证验证码，不做保存
	 * 
	 * @param checkcodeToken
	 */
	public void setCheckcodeToken(String checkcodeToken) {
		this.checkcodeToken = checkcodeToken;
	}

	/**
	 * 注册时，如果是别人邀请的链接注册，带出邀请企业信息
	 * 
	 * @return
	 */
	public String getInviteuid() {
		return inviteuid;
	}

	public void setInviteuid(String inviteuid) {
		this.inviteuid = inviteuid;
	}

	/**
	 * 注册时，如果是别人邀请的链接注册，带出邀请人信息
	 * 
	 * @return
	 */
	public String getInviteUserCode() {
		return inviteUserCode;
	}

	public void setInviteUserCode(String inviteUserCode) {
		this.inviteUserCode = inviteUserCode;
	}

	/**
	 * 邀请如果有方式为addVendor，需要同步到平台去自动添加供应商
	 * 
	 * @return
	 */
	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	/**
	 * 联系人
	 *
	 * @return
	 */
	public String getContactMan() {
		return contactMan;
	}

	public void setContactMan(String contactMan) {
		this.contactMan = contactMan;
	}

    /**
     * 联系人电话
     *
     * @return
     */
    public String getContactTel() {
        return contactTel;
    }

    public void setContactTel(String contactTel) {
        this.contactTel = contactTel;
    }

    /**
     * 联系人邮箱
     *
     * @return
     */
    public String getContactEmail() {
        return contactEmail;
    }

    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }

	/**
     * 标签
     *
     * @return
     */
	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	/**
     * 行业
     *
     * @return
     */
    public String getProfession() {
        return profession;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

	/**
	 * 企业UU
	 * @return
	 */
	public Long getUu() {
		return uu;
	}

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

    /**
     * 众创需要的企业的信息
     *
     * @return
     */
	public UuzcUserSpaceDetail covert() {
        UuzcUserSpaceDetail detail = new UuzcUserSpaceDetail();
        detail.setAdminEmail(this.adminEmail);
        detail.setAdminName(this.adminName);
        detail.setAdminTel(this.adminTel);
        detail.setBusinessCode(this.businessCode);
        detail.setContactEmail(this.contactEmail);
        detail.setContactMan(this.contactMan);
        detail.setContactTel(this.contactTel);
        detail.setCorporation(this.corporation);
        detail.setName(this.name);
        detail.setTel(this.tel);
        detail.setUrl(this.url);
        return detail;
    }
}
