package com.bohuikeji.frame.module.admin.entity.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bohuikeji.frame.module.admin.annotation.TableKeyField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.TextBlock;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 系统配置项
 * </p>
 *
 * @author jobob
 * @since 2019-08-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class SysConfig extends EntityBase<SysConfig> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "config_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false,required = false)
    private Integer configId;

    /**
     * 上级id
     */
    @ApiModelProperty(value = "上级id")
    @TableField("cinfig_super")
    @TableShowField(value = "上级配置",show = false)
    @TableNewField(edit = false,block = SelectBlock.class)
    @TableKeyField(table = "sys_config",keyShowFields = {"config_name"}
    ,where = "config_key in('cargo_type','car_type_xshc','car_type_pkc','car_type_mbc','car_type_ddc','service_type','weight','common_problem')",key = SysConfig.class)
    @TableQueryField
    private Integer cinfigSuper;

    /**
     * 配置名称
     */
    @ApiModelProperty(value = "配置名称")
    @TableField("config_name")
    @TableShowField("配置名称")
    @TableNewField()
    private String configName;

    /**
     * 配置类型
     */
    @ApiModelProperty(value = "配置类型")
    @TableField("config_type")
    @TableShowField("配置类型")
    @TableNewField()
    private String configType;

    /**
     * 配置key
     */
    @ApiModelProperty(value = "配置key")
    @TableField("config_key")
    @TableShowField(value = "配置key",show = false)
    @TableNewField(edit = false,required = false)
    private String configKey;

    /**
     * 配置value
     */
    @ApiModelProperty(value = "配置value")
    @TableField("config_value")
    @TableShowField("配置值")
    @TableNewField(block = TextBlock.class,required = false)
    private String configValue;

    /**
     * 配置数据一
     */
    @ApiModelProperty(value = "配置数据一")
    @TableField("config_data_one")
    @TableShowField(value = "配置数据一",show = false)
    @TableNewField(show = false,required = false)
    private String configDataOne;

    /**
     * 配置数据二
     */
    @ApiModelProperty(value = "配置数据二")
    @TableField("config_data_two")
    @TableShowField(value = "配置数据二",show = false)
    @TableNewField(show = false,required = false)
    private String configDataTwo;

    /**
     * 配置组
     */
    @ApiModelProperty(value = "配置组")
    @TableField("config_group")
    @TableShowField(value = "配置组")
    @TableNewField()
    private String configGroup;

    /**
     * 默认值
     */
    @ApiModelProperty(value = "默认值")
    @TableField("config_default")
    @TableShowField(value = "默认值",show = false)
    @TableNewField(show = false,required = false)
    private String configDefault;

   /* @ApiModelProperty(value = "配置项备注")
    @TableField("config_rmk")
    @TableShowField(value = "配置项备注",show = false)
    @TableNewField(show = false)
    private String configRmk;*/

    /**
     * 备注
     */
    @ApiModelProperty(value = "配置项备注")
    @TableField("config_mark")
    @TableShowField(value = "配置项备注",show = false)
    @TableNewField(block = TextBlock.class,required = false,show = false)
    private String configMark;

}
