package com.yqzx.generator.action.model;
|
|
import com.yqzx.generator.config.JDBCTemplate;
|
import lombok.Data;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.context.annotation.Configuration;
|
|
import java.util.List;
|
|
/**
|
* @description: 代码生成web传参
|
* @author: chaoyapeng
|
* @time: 2020/8/18 15:50
|
*/
|
@Data
|
@Configuration
|
@ConfigurationProperties(prefix = "geo")
|
public class GenQo {
|
/**
|
* 数据库驱动
|
*/
|
private String driverName;
|
|
/**
|
* 数据库账号
|
*/
|
private String userName;
|
|
/**
|
* 数据库密码
|
*/
|
private String password;
|
|
/**
|
* 数据库连接地址
|
*/
|
private String ip;
|
|
/**
|
* 数据库端口
|
*/
|
private String port;
|
|
/**
|
* 数据库名
|
*/
|
private String dataBaseName;
|
|
/**
|
* 数据库url
|
*/
|
// private String url;
|
|
/**
|
* 项目地址
|
*/
|
private String projectPath;
|
|
/**
|
* 作者
|
*/
|
private String author;
|
|
/**
|
* 项目的包
|
*/
|
private String projectPackage;
|
|
/**
|
* 表名称
|
*/
|
private String tableName;
|
|
/**
|
* 业务名称
|
*/
|
private String bizName;
|
|
/**
|
* 是否生成控制器代码开关
|
*/
|
private Boolean controllerSwitch = false;
|
|
/**
|
* service
|
*/
|
private Boolean serviceSwitch = false;
|
|
/**
|
* mapper的开关
|
*/
|
private Boolean mapperSwitch = false;
|
|
/**
|
* 实体类的开关
|
*/
|
private Boolean modelSwitch = false;
|
|
/**
|
* 查询实体类的开关
|
*/
|
private Boolean querySwitch = false;
|
|
/**
|
* 查询参数对象
|
*/
|
private List<TableInfo> queryTableInfo;
|
|
/**
|
* 获取数据库url 地址
|
*
|
* @return 数据库连接url
|
*/
|
public String getUrl() {
|
return String.format(JDBCTemplate.MYSQL_JDBC, this.getIp(), this.getPort(), this.getDataBaseName());
|
}
|
}
|