package com.yuchen.saas.manage.user.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nest.springwrap.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 企业用户
 * @date 2021/1/1 15:45
 */
@Data
@TableName("saas_company")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "企业用户对象", description = "企业用户对象")
public class SaasCompany extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(
            using = ToStringSerializer.class
    )
    @ApiModelProperty("父级id")
    private Long parentId;

    @ApiModelProperty(value = "企业名称")
    private String companyName;
    @ApiModelProperty(value = "所属行业")
    private String companyTrade;
    @ApiModelProperty(value = "企业规模")
    private String companyScope;
    @ApiModelProperty(value = "企业联系人手机")
    private String phone;
    @ApiModelProperty(value = "登录密码")
    @JsonIgnore
    private String password;
    @ApiModelProperty(value = "企业联系人")
    private String linkMan;
    @ApiModelProperty(value = "联系电话")
    private String linkPhone;
    @ApiModelProperty(value = "省")
    private String province;
    @ApiModelProperty(value = "省名称")
    private String provinceName;
    @ApiModelProperty(value = "市")
    private String city;
    @ApiModelProperty(value = "市名称")
    private String cityName;
    @ApiModelProperty(value = "区/县")
    private String county;
    @ApiModelProperty(value = "区/县名称")
    private String countyName;
    @ApiModelProperty(value = "镇/街道")
    private String town;
    @ApiModelProperty(value = "镇/街道名称")
    private String townName;
    @ApiModelProperty(value = "公司地址")
    private String address;

    @ApiModelProperty(value = "企业名称")
    private String organName;

    @ApiModelProperty(value = "统一信用代码")
    private String creditCode;

    @ApiModelProperty(value = "证件类型")
    private Integer creditType;

    @ApiModelProperty(value = "证件有效期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date effectiveTime;

    @ApiModelProperty(value = "机构类型")
    private String organType;

    @ApiModelProperty(value = "法人")
    private String legalPerson;

    @ApiModelProperty(value = "审核原因")
    private String reason;

    @ApiModelProperty(value = "认证提交时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditSubmitTime;

    @ApiModelProperty(value = "审核时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    @ApiModelProperty(value = "审核人")
    @JsonSerialize(
            using = ToStringSerializer.class
    )
    private Long auditUser;

    @ApiModelProperty(value = "审核人")
    private String auditUserName;

    @ApiModelProperty(value = "认证状态")
    private Integer cerStatus;

    @ApiModelProperty(value = "来源")
    private Integer source;

}
