package com.yh.saas.plugin.news.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.yh.saas.common.support.entity.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author Chenly
 * @since 2019-10-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("news_parameter_company")
public class ParameterCompany extends BaseModel<ParameterCompany> {

    private static final long serialVersionUID = 1L;

    /**
     * 变量ID
     */
    @TableId(type = IdType.UUID)
    private String id;
    /**
     * 公司ID
     */
    private String compId;
    /**
     * 变量类型ID
     */
    private String constCode;
    /**
     * 变量KEY（自增数字形式）
     */
    private String parameterKey;
    /**
     * 变量值
     */
    private String parameterValue;
    /**
     * 描述
     */
    private String description;
    /**
     * 变量英文值
     */
    private String parameterValueEn;
    private Integer orderNum;


    @TableField(exist = false)
    private int maxId;

    //删除判断是否被使用
    @TableField(exist = false)
    private int rowCnt;

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

    public static class QueryFields {

        public static final String COMP_ID = "comp_id";

        public static final String ID = "id";

        public static final String PARAMETERVALUE = "parameter_value";

        public static final String PARAMETERKEY = "parameter_key";

        public static final String CONST_CODE = "const_code";

        public static final String CREATE_DATE = "create_date";

        public static final String ORDER_NUM = "order_num";

        public static final String DELETE_FLAG = "delete_flag";

        private QueryFields() {
        }
    }


}
