LuskiServer/LuskiServer/Classes/AppConfig.cs
2023-04-02 16:44:26 -04:00

29 lines
955 B
C#

using System.Text.Json.Serialization;
namespace LuskiServer.Classes;
public class AppConfig
{
[JsonInclude]
[JsonPropertyName("address")]
public string Address { get; set; } = "127.0.0.1";
[JsonInclude]
[JsonPropertyName("database")]
public string Database { get; set; } = "Some database name";
[JsonInclude]
[JsonPropertyName("username")]
public string Username { get; set; } = "Some postgresql username";
[JsonInclude]
[JsonPropertyName("password")]
public string Password { get; set; } = "Some postgresql password";
[JsonInclude]
[JsonPropertyName("connection_name")]
public string CustomeName { get; set; } = "Luski Server";
}
[JsonSerializable(typeof(AppConfig))]
[JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.Never, GenerationMode = JsonSourceGenerationMode.Default)]
internal partial class AppConfigContext : JsonSerializerContext
{
}