Add initial hcs database schema creation

This commit is contained in:
2025-10-22 16:42:00 +09:00
parent 77626a8e52
commit 37cf856685
38 changed files with 302 additions and 336 deletions

View File

@ -1,5 +1,4 @@
using Hcs.Broker.Api.Registry;
using Hcs.Broker.Api.Type;
using Hcs.Broker.Api.Type;
namespace Hcs.Broker.Api.Payload.Bills
{

View File

@ -1,6 +1,4 @@
using Hcs.Broker.Api.Registry;
namespace Hcs.Broker.Api.Payload.DeviceMetering
namespace Hcs.Broker.Api.Payload.DeviceMetering
{
// http://open-gkh.ru/DeviceMetering/exportMeteringDeviceHistoryRequest.html
public class ExportMeteringDeviceHistoryPayload

View File

@ -1,5 +1,4 @@
using Hcs.Broker.Api.Registry;
using Hcs.Service.Async.HouseManagement;
using Hcs.Service.Async.HouseManagement;
namespace Hcs.Broker.Api.Payload.HouseManagement
{

View File

@ -1,5 +1,4 @@
using Hcs.Broker.Api.Registry;
using Hcs.Service.Async.HouseManagement;
using Hcs.Service.Async.HouseManagement;
namespace Hcs.Broker.Api.Payload.HouseManagement
{

View File

@ -1,4 +1,4 @@
namespace Hcs.Broker.Api.Registry
namespace Hcs.Broker.Api.Payload
{
public class RegistryElement(string code, string guid)
{

View File

@ -1,16 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Межповерочный интервал" (реестровый номер 16).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-16/v1.
/// </summary>
public static class Registry16
{
/// <summary>
/// 4 года
/// </summary>
public static RegistryElement Element4 => new(
"4",
"e5e3288d-2994-41f7-8e44-f329b09ab77f");
}
}

View File

@ -1,16 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Коммунальный ресурс" (реестровый номер 2).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-2/v1.
/// </summary>
public static class Registry2
{
/// <summary>
/// Тепловая энергия
/// </summary>
public static RegistryElement Element5 => new(
"5",
"44af905f-09c3-4cc3-b749-70048a53d8cf");
}
}

View File

@ -1,16 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Тарифицируемый ресурс" (реестровый номер 239).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-239/v1.
/// </summary>
public static class Registry239
{
/// <summary>
/// Тепловая энергия
/// </summary>
public static RegistryElement Element4 => new(
"4",
"eec6e4b8-76c8-4fce-99b7-c95718edad19");
}
}

View File

@ -1,37 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Состояние дома" (реестровый номер 24).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-24/v1.
/// </summary>
public static class Registry24
{
/// <summary>
/// Аварийный
/// </summary>
public static RegistryElement Element1 => new(
"1",
"cbe05853-a91b-43cc-a2cb-06cdfa97d492");
/// <summary>
/// Исправный
/// </summary>
public static RegistryElement Element2 => new(
"2",
"2d3ae73e-6c72-4740-9122-9c632d1893a7");
/// <summary>
/// Ветхий
/// </summary>
public static RegistryElement Element3 => new(
"3",
"bf083ae4-e4ec-4ace-b190-4d009e5cd1a1");
/// <summary>
/// Не выбран
/// </summary>
public static RegistryElement Element4 => new(
"4",
"4ee07c0b-82d6-41f4-a8c5-2cff784bbd9c");
}
}

View File

@ -1,16 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Тип прибора учета" (реестровый номер 27).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-27/v1.
/// </summary>
public static class Registry27
{
/// <summary>
/// Индивидуальный
/// </summary>
public static RegistryElement Element1 => new(
"1",
"3a9687b5-caed-4ec6-8a08-f4d3d012f2c7");
}
}

View File

@ -1,23 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Показатели качества коммунальных ресурсов" (реестровый номер 276).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-276/v1.
/// </summary>
public static class Registry276
{
/// <summary>
/// Величина тепловой нагрузки
/// </summary>
public static RegistryElement Element4 => new(
"4",
"51dd6edc-83fe-4810-8b62-4dc85a75e9a3");
/// <summary>
/// Диапазон давления теплоносителя в подающем трубопроводе
/// </summary>
public static RegistryElement Element10 => new(
"10",
"a5a17c90-cc4b-4f32-a22b-6e06cd42a68c");
}
}

View File

@ -1,16 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Вид коммунальной услуги" (реестровый номер 3).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-3/v1.
/// </summary>
public static class Registry3
{
/// <summary>
/// Отопление
/// </summary>
public static RegistryElement Element6 => new(
"6",
"74925764-ddf3-4b4b-b18d-85994187c13a");
}
}

View File

@ -1,16 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Часовые зоны по Olson" (реестровый номер 32).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-32/v1.
/// </summary>
public static class Registry32
{
/// <summary>
/// Иркутск
/// </summary>
public static RegistryElement Element11 => new(
"11",
"244ae392-0b96-46f2-80ea-4dac32e7326a");
}
}

View File

@ -1,58 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Стадия жизненного цикла" (реестровый номер 338).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-338/v1.
/// </summary>
public static class Registry338
{
/// <summary>
/// Эксплуатация
/// </summary>
public static RegistryElement Element1 => new(
"1",
"29b18683-5195-4ef4-83fc-71bf45597d46");
/// <summary>
/// Реконструкция
/// </summary>
public static RegistryElement Element2 => new(
"2",
"75764145-f181-47e5-bff1-1306a46eb20e");
/// <summary>
/// Капитальный ремонт с отселением
/// </summary>
public static RegistryElement Element3 => new(
"3",
"dee170df-db42-4cd6-9e5e-b62be91b3663");
/// <summary>
/// Капитальный ремонт без отселения
/// </summary>
public static RegistryElement Element4 => new(
"4",
"91dc91e2-6883-4c84-b711-53f57f28dbe2");
/// <summary>
/// Снос
/// </summary>
public static RegistryElement Element5 => new(
"5",
"cc358aa9-10b3-4d6a-bbec-c5f6b14950f6");
/// <summary>
/// Не эксплуатируется, расселен
/// </summary>
public static RegistryElement Element6 => new(
"6",
"4bed3d7e-6015-428e-b4b4-7b7aec171c0d");
/// <summary>
/// Выведен из эксплуатации
/// </summary>
public static RegistryElement Element7 => new(
"7",
"f3edc065-c1a1-4110-96fa-03313ae7a039");
}
}

View File

@ -1,15 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Вид коммунальной услуги" (реестровый номер 51)
/// </summary>
public static class Registry51
{
/// <summary>
/// Отопление
/// </summary>
public static RegistryElement Element6_1 => new(
"6.1",
"14ad13a3-45ce-408b-b641-6fc59554f803");
}
}

View File

@ -1,79 +0,0 @@
namespace Hcs.Broker.Api.Registry
{
/// <summary>
/// НСИ "Основание заключения договора" (реестровый номер 58).
/// Взято из https://dom.gosuslugi.ru/opendataapi/nsi-58/v1.
/// </summary>
public static class Registry58
{
/// <summary>
/// Решение собрания собственников
/// </summary>
public static RegistryElement Element1 => new(
"1",
"110d48b2-32a9-4a44-939c-b784d9794621");
/// <summary>
/// Открытый конкурс
/// </summary>
public static RegistryElement Element2 => new(
"2",
"a9dc59c3-d53f-42eb-ba98-cf8c74d88d36");
/// <summary>
/// Договор управления
/// </summary>
public static RegistryElement Element3 => new(
"3",
"11efe618-79f8-4f53-bfd6-11620e8e9e1e");
/// <summary>
/// Устав
/// </summary>
public static RegistryElement Element4 => new(
"4",
"a2eb920c-8163-4958-812a-ad153a5dfde6");
/// <summary>
/// Решение правления
/// </summary>
public static RegistryElement Element5 => new(
"5",
"58639715-2708-4b8e-a5e6-7cae4ddbf03b");
/// <summary>
/// Решение органа управления застройщика
/// </summary>
public static RegistryElement Element6 => new(
"6",
"9b606ef5-7701-4a12-a837-d81b50939160");
/// <summary>
/// Заявление потребителя
/// </summary>
public static RegistryElement Element7 => new(
"7",
"93cd9d85-91b8-4bf9-ae48-c5f1e691949f");
/// <summary>
/// Нормативный правовой акт
/// </summary>
public static RegistryElement Element8 => new(
"8",
"8b8ee37b-fa79-40cc-b98d-0e51f0c38d03");
/// <summary>
/// Разрешение на ввод в эксплуатацию
/// </summary>
public static RegistryElement Element9 => new(
"9",
"16331000-d96e-4a33-a6c7-3cb9eacf4927");
/// <summary>
/// Устав
/// </summary>
public static RegistryElement Element10 => new(
"10",
"555638ae-a207-46fa-99bd-88bdb297c45a");
}
}