package com.loan.system.domain.entity;

import lombok.*;

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

@Entity
@Table(name = "customers", indexes = {
        @Index(name = "idx_id_number", columnList = "id_number"),
        @Index(name = "idx_mobile", columnList = "mobile")
})
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Customer extends BaseEntity{
    private static final long serialVersionUID = 5L;

    @Column(name = "openid", length = 128)
    private String openid;

    @Column(name = "name", length = 100)
    private String name;

    @Column(name = "sex", length = 10)
    private String sex;

    @Column(name = "id_number", length = 18)
    private String idNumber;

    @Column(name = "mobile", length = 11)
    private String mobile;

    @Column(name = "married_status", length = 50)
    private String marriedStatus;

    @Column(name = "register_source", length = 50)
    private String registerSource;

    @Column(name = "bank_account", length = 64)
    private String bankAccount;

    @Column(name = "face_auth")
    private Boolean faceAuth;

    @Column(name = "create_time")
    private String createTime;

    @Column(name = "update_time")
    private String updateTime;

    @Column(name = "is_delete")
    private Boolean isDelete;

}