Вынести магические строки статусов, видов и ключей в каталоги
Литералы статусов/видов/фаз и wire-ключей заменены каталогами: значения сущностей и репозиториев — TenantStatuses/TenantLimitPeriods/InviteStatuses/ContainerKinds/ContainerSpaces/CardIds/Discovery*/PipelineQueueStatuses; контакты и виды вложений — CardContactTypes/CardFileKinds; источники и этапы отсева — PipelineRejectStages/PipelineRejectSources; ключи промптов/провайдеров — SettingsFieldKeys; wire-ключи канбана — KanbanWireKeys; режимы правил — ColumnRuleModes; операции/фазы/виды диалогов/контакты Telegram и общий BoolText — в Deal.Contracts/Deal.SharedKernel; имена метрик — DealMetrics. Значения не менялись.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Deal.Contracts.Integrations.Models;
|
||||
|
||||
namespace Deal.Modules.Cards.Application.Models;
|
||||
|
||||
/// <summary>
|
||||
@@ -8,7 +10,7 @@ public sealed record CardContact
|
||||
/// <summary>
|
||||
/// Тип контакта: tg/phone/email/linkedin/whatsapp/site/other.
|
||||
/// </summary>
|
||||
public string Type { get; init; } = "other";
|
||||
public string Type { get; init; } = CardContactTypes.Other;
|
||||
|
||||
/// <summary>
|
||||
/// Значение: @username, +7…, name@mail, url.
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed record CardFile
|
||||
/// <summary>
|
||||
/// Тип контента: image/video/audio/archive/document/other
|
||||
/// </summary>
|
||||
public string Kind { get; init; } = "other";
|
||||
public string Kind { get; init; } = CardFileKinds.Other;
|
||||
|
||||
public string ObjectKey { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace Deal.Modules.Cards.Application.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Категории вложений карточки
|
||||
/// </summary>
|
||||
public static class CardFileKinds
|
||||
{
|
||||
/// <summary>
|
||||
/// Изображение
|
||||
/// </summary>
|
||||
public const string Image = "image";
|
||||
|
||||
/// <summary>
|
||||
/// Видео
|
||||
/// </summary>
|
||||
public const string Video = "video";
|
||||
|
||||
/// <summary>
|
||||
/// Аудио
|
||||
/// </summary>
|
||||
public const string Audio = "audio";
|
||||
|
||||
/// <summary>
|
||||
/// Документ
|
||||
/// </summary>
|
||||
public const string Document = "document";
|
||||
|
||||
/// <summary>
|
||||
/// Архив
|
||||
/// </summary>
|
||||
public const string Archive = "archive";
|
||||
|
||||
/// <summary>
|
||||
/// Прочее (не опознано)
|
||||
/// </summary>
|
||||
public const string Other = "other";
|
||||
}
|
||||
Reference in New Issue
Block a user