package com.zfire.jiasm.syncdata.plus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author gejiang
 * @since 2023-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AdminField对象", description="")
public class AdminField extends Model<AdminField> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    private String adminUserId;

    private String moduleId;

    @ApiModelProperty(value = "字段标题")
    private String label;

    @ApiModelProperty(value = "java属性名")
    private String jName;

    @ApiModelProperty(value = "提示语")
    private String placeholder;

    @ApiModelProperty(value = "输入类型【input/select/number/amount/datetime】文本/选择/数字/金额")
    private String type;

    @ApiModelProperty(value = "是否多选 true=多选  false=单选")
    private Boolean multiple;

    @ApiModelProperty(value = "前端预留code，特殊情况使用")
    private String frontCode;

    @ApiModelProperty(value = "字段所属表")
    private String tbName;

    @ApiModelProperty(value = "字段名称")
    private String colName;

    @ApiModelProperty(value = "字段显示宽度")
    private Integer width;

    @ApiModelProperty(value = "排序字段，越小越前")
    private Integer sortNum;

    @ApiModelProperty(value = "是否显示 true=显示 false=隐藏")
    private Boolean isShow;

    @ApiModelProperty(value = "是否可复制 true=可  false=否")
    private Boolean isCopy;

    @ApiModelProperty(value = "是否汇总 true=可 false=否")
    private Boolean isTotal;

    @ApiModelProperty(value = "是否查询 true/false")
    private Boolean isQuery;

    private Boolean hide;

    @ApiModelProperty(value = "枚举选项json")
    private String enumMap;

    @ApiModelProperty(value = "是否为主键 true=是 false=否(为true会显示操作记录)")
    private Boolean pk;

    @ApiModelProperty(value = "是否显示平铺查询条件")
    private Boolean tiling;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
