package com.ruoyi.ibs.grid.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.ibs.enumertion.CustIdTypeEnum;
import com.ruoyi.ibs.enumertion.CustTypeEnum;
import com.ruoyi.ibs.handler.CustIdTypeHandler;
import com.ruoyi.ibs.handler.CustTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author 吴凯程
 * @Date 2024/9/18
 **/
@Data
@TableName("grid_virtual_cust")
public class VirtualCust implements Serializable {

    /**
     * 主键
     */
    @ApiModelProperty(value = "网格主键", name = "id")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 网格id
     */
    @ApiModelProperty(value = "网格id", notes = "")
    private Long gridId;

    @ApiModelProperty(value = "客户类型", name = "custType", notes = "个人 企业 商户")
    @TableField(typeHandler = CustTypeHandler.class)
    private CustTypeEnum custType;

    @ApiModelProperty(value = "客户号", name = "custId")
    private String custId;

    @ApiModelProperty(value = "客户姓名", name = "custName")
    private String custName;

    @ApiModelProperty(value = "客户内码", name = "custIsn")
    private String custIsn;

    @ApiModelProperty(value = "客户证件类型", name = "custIdType")
    @TableField(typeHandler = CustIdTypeHandler.class)
    private CustIdTypeEnum custIdType;

    @ApiModelProperty(value = "客户证件号", name = "custIdn")
    private String custIdn;

    @ApiModelProperty(value = "电话号码", name = "phoneNum")
    private String phoneNum;

    @ApiModelProperty(value = "是否绑定管护", name = "lockFlag")
    private Boolean lockFlag;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 更新者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    /**
     * 删除标识
     */
    @TableLogic
    private Boolean deleteFlag;
}
