package com.izouma.zhirongip.domain;

import com.izouma.zhirongip.annotations.Searchable;
import com.izouma.zhirongip.enums.ApplyStatus;
import com.izouma.zhirongip.enums.InstitutionalNature;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.time.LocalDate;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Where(clause = "del = 0")
@ApiModel(value = "机构认证")
public class Institution extends BaseEntity {
    private Long userId;

    @Searchable
    private String name;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "机构性质")
    private InstitutionalNature nature;

    @ApiModelProperty(value = "成立日期")
    private LocalDate establishedAt;

    @ApiModelProperty(value = "官网地址")
    private String url;

    @Column(columnDefinition = "TEXT")
    @ApiModelProperty(value = "机构简介")
    private String introduction;

    private String logo;

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

//    @ApiModelProperty(value = "名片")
//    private String card;

    @ApiModelProperty(value = "营业执照")
    private String businessLicense;

    @Enumerated(EnumType.STRING)
    private ApplyStatus status;
}
