DatasourceConfig.java 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. package com.gitee.gen.entity;
  2. import java.util.Objects;
  3. /**
  4. * 数据源配置表
  5. */
  6. public class DatasourceConfig {
  7. private Integer id;
  8. /** 数据库类型,1:MySql, 2:Oracle, 3:sqlserver */
  9. private Integer dbType;
  10. /** 数据库驱动 */
  11. private String driverClass;
  12. /** 数据库名称 */
  13. private String dbName;
  14. /** 数据库host */
  15. private String host;
  16. /** 数据库端口 */
  17. private Integer port;
  18. /** 数据库用户名 */
  19. private String username;
  20. /** 数据库密码 */
  21. private String password;
  22. /** 是否已删除,1:已删除,0:未删除 */
  23. private Integer isDeleted;
  24. /** 包名*/
  25. private String packageName;
  26. /** 删除的前缀*/
  27. private String delPrefix;
  28. /** 代码生成器模板组id*/
  29. private String groupId;
  30. public Integer getId() {
  31. return id;
  32. }
  33. public void setId(Integer id) {
  34. this.id = id;
  35. }
  36. public Integer getDbType() {
  37. return dbType;
  38. }
  39. public void setDbType(Integer dbType) {
  40. this.dbType = dbType;
  41. }
  42. public String getDriverClass() {
  43. return driverClass;
  44. }
  45. public void setDriverClass(String driverClass) {
  46. this.driverClass = driverClass;
  47. }
  48. public String getDbName() {
  49. return dbName;
  50. }
  51. public void setDbName(String dbName) {
  52. this.dbName = dbName;
  53. }
  54. public String getHost() {
  55. return host;
  56. }
  57. public void setHost(String host) {
  58. this.host = host;
  59. }
  60. public Integer getPort() {
  61. return port;
  62. }
  63. public void setPort(Integer port) {
  64. this.port = port;
  65. }
  66. public String getUsername() {
  67. return username;
  68. }
  69. public void setUsername(String username) {
  70. this.username = username;
  71. }
  72. public String getPassword() {
  73. return password;
  74. }
  75. public void setPassword(String password) {
  76. this.password = password;
  77. }
  78. public Integer getIsDeleted() {
  79. return isDeleted;
  80. }
  81. public void setIsDeleted(Integer isDeleted) {
  82. this.isDeleted = isDeleted;
  83. }
  84. public String getPackageName() {
  85. return packageName;
  86. }
  87. public void setPackageName(String packageName) {
  88. this.packageName = packageName;
  89. }
  90. public String getDelPrefix() {
  91. return delPrefix;
  92. }
  93. public void setDelPrefix(String delPrefix) {
  94. this.delPrefix = delPrefix;
  95. }
  96. public String getGroupId() {
  97. return groupId;
  98. }
  99. public void setGroupId(String groupId) {
  100. this.groupId = groupId;
  101. }
  102. @Override
  103. public boolean equals(Object o) {
  104. if (this == o) return true;
  105. if (o == null || getClass() != o.getClass()) return false;
  106. DatasourceConfig that = (DatasourceConfig) o;
  107. return Objects.equals(id, that.id) &&
  108. Objects.equals(dbType, that.dbType) &&
  109. Objects.equals(driverClass, that.driverClass) &&
  110. Objects.equals(dbName, that.dbName) &&
  111. Objects.equals(host, that.host) &&
  112. Objects.equals(port, that.port) &&
  113. Objects.equals(username, that.username) &&
  114. Objects.equals(password, that.password) &&
  115. Objects.equals(isDeleted, that.isDeleted) &&
  116. Objects.equals(packageName, that.packageName) &&
  117. Objects.equals(delPrefix, that.delPrefix) &&
  118. Objects.equals(groupId, that.groupId);
  119. }
  120. @Override
  121. public int hashCode() {
  122. return Objects.hash(id, dbType, driverClass, dbName, host, port, username, password, isDeleted, packageName, delPrefix, groupId);
  123. }
  124. @Override
  125. public String toString() {
  126. return "DatasourceConfig{" +
  127. "id=" + id +
  128. ", dbType=" + dbType +
  129. ", driverClass='" + driverClass + '\'' +
  130. ", dbName='" + dbName + '\'' +
  131. ", host='" + host + '\'' +
  132. ", port=" + port +
  133. ", username='" + username + '\'' +
  134. ", password='" + password + '\'' +
  135. ", isDeleted=" + isDeleted +
  136. ", packageName='" + packageName + '\'' +
  137. ", delPrefix='" + delPrefix + '\'' +
  138. ", groupId='" + groupId + '\'' +
  139. '}';
  140. }
  141. }