package com.yunzhupaas.permission.model.authorize;

import lombok.Data;
import org.mybatis.dynamic.sql.BasicColumn;
import org.mybatis.dynamic.sql.SqlColumn;
import org.mybatis.dynamic.sql.SqlTable;

import java.util.List;
import java.util.Map;

/**
 *
 * dynamicSql模型
 * @author 云筑产品开发平台组
 * @version V3.4.4
 * @copyright 深圳市乐程软件有限公司（http://www.szlecheng.cn）
 * @date  2022/9/27
 */
@Data
public class OnlineDynamicSqlModel {
	private List<BasicColumn> columns;
	private SqlTable sqlTable;
	private String tableName;
	private boolean isMain;
	private String foreign;
	private String relationKey;

	public OnlineDynamicSqlModel(){

	}

	public OnlineDynamicSqlModel(SqlTable sqlTable, List<BasicColumn> sqlColumns) {
		this.sqlTable = sqlTable;
		this.columns = sqlColumns;
		this.isMain = true;
	}

	public OnlineDynamicSqlModel(SqlTable sqlTable, List<BasicColumn> sqlColumns,String foreign,String relationKey, boolean b) {
		this.sqlTable = sqlTable;
		this.columns = sqlColumns;
		this.foreign = foreign;
		this.relationKey = relationKey;
		this.isMain = b;
	}
}

