package com.izouma.jmrh.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
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("企业认证")
@ExcelIgnoreUnannotated
public class OrgInfo extends BaseEntity {
    @ApiModelProperty("单位名称")
    @ExcelProperty("单位名称")
    @Convert(converter = EncryptConverter.class)
    private String orgName;

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

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

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

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

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

    @ApiModelProperty("地理位置")
    @ExcelProperty("地理位置")
    private String location;

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


    @ApiModelProperty("企业介绍")
    @ExcelProperty("企业介绍")
    @Column(columnDefinition = "TEXT")
    private String intro;


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

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

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

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

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

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

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

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

    @ApiModelProperty("用户ID")
    @Column(nullable = false)
    private Long userId;

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

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

    @Transient
    private String nickname;

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

}
