package config

func Database() *ConfigNode {
	return &ConfigNode{
		"driver":              "mysql",
		"host":                env("MYSQL_HOST", "localhost"),
		"port":                env("MYSQL_PORT", "3306"),
		"database":            env("MYSQL_DATABASE", "chunhao"),
		"userName":            env("MYSQL_USERNAME", "root"),
		"password":            env("MYSQL_PASSWORD", "root"),
		"charset":             "utf8mb4",
		"maxIdleConns":        "10",
		"maxOpenConns":        "50",
		"logMode":             env("MYSQL_LOG_MODE", "info"),
		"enableFileLogWriter": env("MYSQL_ENABLE_LOG_WRITE", "true"),
	}
}
