package com.izouma.zhirongip.domain;

import com.izouma.zhirongip.enums.ApplyStatus;
import com.izouma.zhirongip.enums.DocumentType;
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.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Where(clause = "del = 0")
@ApiModel(value = "个人认证", description = "个人认证")
public class Personal extends BaseEntity {
    private Long userId;

    @Enumerated(EnumType.STRING)
    @ApiModelProperty(value = "证件类型")
    private DocumentType type;

    @ApiModelProperty(value = "证件编号")
    private String documentNumber;

    @ApiModelProperty(value = "证件照片(正面)")
    private String photoFront;

    @ApiModelProperty(value = "证件照片(反面)")
    private String photoBackside;

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