Add settings endpoints and registration status check: implement new API endpoints for settings management, including registration status retrieval, and update the registration command handler to enforce registration rules based on site settings.

This commit is contained in:
Leonid Pershin
2026-07-25 07:48:17 +03:00
parent 1bdc3323ab
commit c53848477f
33 changed files with 1289 additions and 17 deletions
@@ -0,0 +1,19 @@
namespace TeleWave.Domain.Settings;
/// <summary>
/// Простое key-value хранилище настроек сайта (единичные глобальные флаги/значения, которые админ
/// меняет в рантайме). Ключ — стабильный строковый идентификатор; значение — строка (парсится
/// потребителем). Отсутствие ключа трактуется как значение по умолчанию.
/// </summary>
public class AppSetting
{
public string Key { get; private set; } = string.Empty;
public string Value { get; private set; } = string.Empty;
private AppSetting() { }
public static AppSetting Create(string key, string value) =>
new() { Key = key, Value = value };
public void SetValue(string value) => Value = value;
}