package su.xserver.iikocon.config;

import io.vertx.core.json.JsonObject;

public class DatabaseConfig {
  public String host;
  public int port;
  public String database;
  public String user;
  public String password;
  public int connectionTimeout;
  public int maxPoolSize;

  public JsonObject json() {
    return new JsonObject()
      .put("database", new JsonObject()
        .put("host", host)
        .put("port", port)
        .put("user", user)
        .put("password", password)
        .put("database", database)
        .put("connectionTimeout", connectionTimeout)
        .put("maxPoolSize", maxPoolSize)
      );
  }
}
