001/*
002 *  Copyright (c) 2022-2023, Mybatis-Flex (fuhai999@gmail.com).
003 *  <p>
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *  <p>
008 *  http://www.apache.org/licenses/LICENSE-2.0
009 *  <p>
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package com.mybatisflex.core;
017
018/**
019 * Mybatis-Flex 可能用到的静态常量
020 */
021public class FlexConsts {
022
023    private FlexConsts() {
024    }
025
026    public static final String NAME = "MyBatis-Flex";
027    public static final String VERSION = "1.5.1";
028
029    public static final String DEFAULT_PRIMARY_FIELD = "id";
030
031    public static final String SQL = "$$sql";
032    public static final String SQL_ARGS = "$$sql_args";
033    public static final String SCHEMA_NAME = "$$schemaName";
034    public static final String TABLE_NAME = "$$tableName";
035    public static final String FIELD_NAME = "$$fieldName";
036    public static final String PRIMARY_KEY = "$$primaryKey";
037    public static final String PRIMARY_VALUE = "$$primaryValue";
038    public static final String VALUE = "$$value";
039
040    public static final String QUERY = "$$query";
041    public static final String ROW = "$$row";
042    public static final String ROWS = "$$rows";
043
044    public static final String ENTITY = "$$entity";
045    public static final String ENTITIES = "$$entities";
046    public static final String IGNORE_NULLS = "$$ignoreNulls";
047
048    public static final String METHOD_INSERT_BATCH = "insertBatch";
049
050    public static final Object[] EMPTY_ARRAY = new Object[0];
051
052
053    /**
054     * 当 entity 使用逻辑删除时,0 为 entity 的正常状态
055     */
056    public static final int LOGIC_DELETE_NORMAL = 0;
057    /**
058     * 当 entity 使用逻辑删除时,1 为 entity 的删除状态
059     */
060    public static final int LOGIC_DELETE_DELETED = 1;
061
062}