Капитальная чистка кода

This commit is contained in:
2025-05-15 02:05:18 +04:00
parent 2b61669e7a
commit 4a7067f0b9
43 changed files with 55 additions and 118 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ public static class EfCleanHelper
object? schema = entityType.FindAnnotation("Relational:Schema")?.Value;
string tableName =
entityType.GetAnnotation("Relational:TableName")?.Value?.ToString()
entityType.GetAnnotation("Relational:TableName").Value?.ToString()
?? throw new($"Не могу определить название таблицы для типа {entityType}");
string schemaName = schema?.ToString() ?? defaultSchemaName;
-32
View File
@@ -11,7 +11,6 @@ using Pf2eModel.Model.Base.Source;
using Pf2eModel.Model.Base.Targets;
using Pf2eModel.Model.Common;
using Pf2eModel.Model.Common.I18n;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure;
using Pf2eModel.Model.Structure.AncestryRelation;
using Pf2eModel.Model.Structure.ArchetypeRelation;
@@ -85,37 +84,6 @@ public partial class Pf2eDbContext
.IsRequired(required);
}
/// <summary>
/// Определяет перечисления, используемые в модели.
/// </summary>
/// <param name="modelBuilder">Построитель модели.</param>
private void DefineEnums(ModelBuilder modelBuilder)
{
modelBuilder
.HasPostgresEnum<LocaleType>()
.HasPostgresEnum<ActionCategory>()
.HasPostgresEnum<ActionEnum>()
.HasPostgresEnum<AttributeValues>()
.HasPostgresEnum<ClassProgressionType>()
.HasPostgresEnum<ConditionGroup>()
.HasPostgresEnum<DeityCategory>()
.HasPostgresEnum<DeityFonts>()
.HasPostgresEnum<DeitySanctification>()
.HasPostgresEnum<ElementEnum>()
.HasPostgresEnum<EntityRarity>()
.HasPostgresEnum<EntityType>()
.HasPostgresEnum<FeatCategory>()
.HasPostgresEnum<SizeEnum>()
.HasPostgresEnum<SourceCategory>()
.HasPostgresEnum<SpellAreaType>()
.HasPostgresEnum<SpellDamageCategory>()
.HasPostgresEnum<SpellDamageKinds>()
.HasPostgresEnum<SpellTradition>()
.HasPostgresEnum<TrainingRank>()
.HasPostgresEnum<TraitType>()
.HasPostgresEnum<VisionEnum>();
}
/// <summary>
/// Определяет базовые сущности и их связи.
/// </summary>