MireaBackend/ApiDto/Requests/Configuration/DatabaseRequest.cs

44 lines
1.0 KiB
C#
Raw Normal View History

2024-05-29 03:38:21 +03:00
using System.ComponentModel.DataAnnotations;
namespace Mirea.Api.Dto.Requests.Configuration;
2024-05-29 03:41:54 +03:00
/// <summary>
/// Represents a request to configure the database connection settings.
/// </summary>
2024-05-29 03:38:21 +03:00
public class DatabaseRequest
{
2024-05-29 03:41:54 +03:00
/// <summary>
/// Gets or sets the server address.
/// </summary>
2024-05-29 03:38:21 +03:00
[Required]
public required string Server { get; set; }
2024-05-29 03:41:54 +03:00
/// <summary>
/// Gets or sets the port number.
/// </summary>
2024-05-29 03:38:21 +03:00
[Required]
public int Port { get; set; }
2024-05-29 03:41:54 +03:00
/// <summary>
/// Gets or sets the database name.
/// </summary>
2024-05-29 03:38:21 +03:00
[Required]
public required string Database { get; set; }
2024-05-29 03:41:54 +03:00
/// <summary>
/// Gets or sets the username.
/// </summary>
2024-05-29 03:38:21 +03:00
[Required]
public required string User { get; set; }
2024-05-29 03:41:54 +03:00
/// <summary>
/// Gets or sets a value indicating whether SSL is enabled.
/// </summary>
2024-05-29 03:38:21 +03:00
[Required]
public bool Ssl { get; set; }
2024-05-29 03:41:54 +03:00
/// <summary>
/// Gets or sets the password.
/// </summary>
2024-05-29 03:38:21 +03:00
public string? Password { get; set; }
}