package com.izouma.dingdong.domain;

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;

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Where(clause = "enabled = 1")
@ApiModel(value = "实名认证", description = "实名认证")
public class Verified extends BaseEntity {

    @ApiModelProperty(value = "用户ID", name = "userId")
    private Long userId;

    @ApiModelProperty(value = "真实姓名", name = "realName")
    private String realName;

    @ApiModelProperty(value = "身份证号", name = "idNo")
    private String idNo;

    @ApiModelProperty(value = "身份证照片", name = "idNoImg")
    private String idNoImg;

    @ApiModelProperty(value = "手持身份证照片", name = "handheldIdNo")
    private String handheldIdNo;

    @Column(nullable = false)
    @ApiModelProperty(value = "可修改", name = "canEdit")
    private Boolean canEdit = true;

    @Builder.Default
    @Column(nullable = false)
    private Boolean enabled = true;
}
