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

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.ibs.enumertion.CustTypeEnum;
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/10/31
 **/
@Data
@TableName("grid_virtual_rule")
public class VirtualGridRule implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value = "id", notes = "")
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 网格id
     */
    @ApiModelProperty(value = "网格id", notes = "")
    private Long gridId;
    /**
     * 关联类型;个人 企业 商户
     */
    @ApiModelProperty(value = "关联类型", notes = "个人 企业 商户")
    @TableField(typeHandler = CustTypeHandler.class)
    private CustTypeEnum relateType;
    /**
     * 规则排序
     */
    @ApiModelProperty(value = "规则排序", notes = "")
    private Integer ruleOrder;
    /**
     * 规则码值
     */
    @ApiModelProperty(value = "规则码值", notes = "")
    private Integer ruleKey;

    @ApiModelProperty(value = "随机或指定柜员号", notes = "")
    private String userDeptList;

    @ApiModelProperty(value = "随机或指定柜员号", notes = "")
    private String userName;

    @ApiModelProperty(value = "特色网格图层编号")
    private String layerId;

    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    /**
     * 删除标识
     */
    @TableLogic
    private Boolean deleteFlag;
}
