package com.izouma.jmrh.domain;

import com.izouma.jmrh.converter.EncryptConverter;
import com.izouma.jmrh.enums.AuditStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.time.LocalDateTime;

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel("企业认证")
public class OrgInfo extends BaseEntity {
    @ApiModelProperty("单位名称")
    @Convert(converter = EncryptConverter.class)
    private String orgName;

    @ApiModelProperty("单位性质")
    private String orgType;

    @ApiModelProperty("所属行业")
    private String industry;

    @ApiModelProperty("上市公司")
    private boolean publicCompany;

    @ApiModelProperty("隶属单位")
    private String parentOrg;

    @ApiModelProperty("所在地")
    private String address;

    @ApiModelProperty("详细地址")
    @Convert(converter = EncryptConverter.class)
    private String addressDetail;

    @ApiModelProperty("企业介绍")
    private String intro;

    @ApiModelProperty("企业logo")
    private String logo;

    @ApiModelProperty("营业执照")
    private String license;

    @ApiModelProperty("营业执照")
    private String uscc;

    @ApiModelProperty("联系人")
    @Convert(converter = EncryptConverter.class)
    private String contactName;

    @ApiModelProperty("身份证号")
    @Convert(converter = EncryptConverter.class)
    private String contactIdNo;

    @ApiModelProperty("手机号")
    @Convert(converter = EncryptConverter.class)
    private String contactPhone;

    @ApiModelProperty("电子邮箱")
    private String contactEmail;

    @ApiModelProperty("信息报送承诺书扫描件")
    @Convert(converter = EncryptConverter.class)
    private String attach;

    @ApiModelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("审核状态")
    @Enumerated(EnumType.STRING)
    private AuditStatus status;

    @ApiModelProperty("备注")
    private String remark;

    @Transient
    private String nickname;

    @ApiModelProperty("审核时间")
    private LocalDateTime auditTime;

}
