package com.ruoyi.system.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * table 联合查询sql存储对象 table_sql
 *
 * @author ruoyi
 * @date 2023-07-19
 */
public class TableSql extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long tId;

    /**
     * 表查询语句
     */
    @Excel(name = "表查询语句")
    private String tableSql;

    /**
     * 表查询条件
     */
    @Excel(name = "表查询条件")
    private String tableCondition;

    /**
     * 表别名
     */
    @Excel(name = "表别名")
    private String tableAlias;

    /**
     * sql编号，绑定tableList
     */
    @Excel(name = "sql编号，绑定tableList")
    private String sqlKey;

    /**
     * 导出的字段名以及列名
     */
    @Excel(name = "导出的字段名以及列名")
    private String tableExportField;

    /**
     * 逻辑删除
     */
    private String delFlag;


    /**
     * 根据某一列进行排序
     */
    private String orderByColumn;

    /**
     * 排序方式  boolean： desc（降序）？ asc（升序）
     */
    private String sortOrder;

    @Override
    public String toString() {
        return "TableSql{" +
                "tId=" + tId +
                ", tableSql='" + tableSql + '\'' +
                ", tableCondition='" + tableCondition + '\'' +
                ", tableAlias='" + tableAlias + '\'' +
                ", sqlKey='" + sqlKey + '\'' +
                ", tableExportField='" + tableExportField + '\'' +
                ", delFlag='" + delFlag + '\'' +
                ", orderByColumn='" + orderByColumn + '\'' +
                ", sortOrder='" + sortOrder + '\'' +
                '}';
    }

    public Long gettId() {
        return tId;
    }

    public void settId(Long tId) {
        this.tId = tId;
    }

    public String getTableSql() {
        return tableSql;
    }

    public void setTableSql(String tableSql) {
        this.tableSql = tableSql;
    }

    public String getTableCondition() {
        return tableCondition;
    }

    public void setTableCondition(String tableCondition) {
        this.tableCondition = tableCondition;
    }

    public String getTableAlias() {
        return tableAlias;
    }

    public void setTableAlias(String tableAlias) {
        this.tableAlias = tableAlias;
    }

    public String getSqlKey() {
        return sqlKey;
    }

    public void setSqlKey(String sqlKey) {
        this.sqlKey = sqlKey;
    }

    public String getTableExportField() {
        return tableExportField;
    }

    public void setTableExportField(String tableExportField) {
        this.tableExportField = tableExportField;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getOrderByColumn() {
        return orderByColumn;
    }

    public void setOrderByColumn(String orderByColumn) {
        this.orderByColumn = orderByColumn;
    }

    public String getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(String sortOrder) {
        this.sortOrder = sortOrder;
    }

    public TableSql() {

    }

    public TableSql(Long tId, String tableSql, String tableCondition, String tableAlias, String sqlKey, String tableExportField, String delFlag, String orderByColumn, String sortOrder) {
        this.tId = tId;
        this.tableSql = tableSql;
        this.tableCondition = tableCondition;
        this.tableAlias = tableAlias;
        this.sqlKey = sqlKey;
        this.tableExportField = tableExportField;
        this.delFlag = delFlag;
        this.orderByColumn = orderByColumn;
        this.sortOrder = sortOrder;
    }
}
