Подготовка сущности божества
This commit is contained in:
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Pf2eModel.Model.Base;
|
||||
using Pf2eModel.Model.Common;
|
||||
using Pf2eModel.Model.Common.I18n;
|
||||
using Pf2eModel.Model.Enum;
|
||||
using Pf2eModel.Model.Structure.DeityRelation;
|
||||
|
||||
@@ -53,7 +54,35 @@ public class Deity : IEntity
|
||||
public bool SanctificationMust { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Аттрибуты божества.
|
||||
/// Заветы божества.
|
||||
/// </summary>
|
||||
[Column(Order = 6)]
|
||||
[Comment("Заветы божества")]
|
||||
public LocaleString Edicts { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Анафемы божества.
|
||||
/// </summary>
|
||||
[Column(Order = 7)]
|
||||
[Comment("Анафемы божества")]
|
||||
public LocaleString Anathema { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Религиозный символ божества.
|
||||
/// </summary>
|
||||
[Column(Order = 8)]
|
||||
[Comment("Религиозный символ божества")]
|
||||
public LocaleString ReligiousSymbol { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Священное животное божества.
|
||||
/// </summary>
|
||||
[Column(Order = 9)]
|
||||
[Comment("Священное животное божества")]
|
||||
public LocaleString SacredAnimal { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Атрибуты божества.
|
||||
/// </summary>
|
||||
public ICollection<DeityAttribute> DeityAttributes { get; set; } = new List<DeityAttribute>();
|
||||
|
||||
|
||||
@@ -434,6 +434,11 @@ public partial class Pf2eDbContext
|
||||
{
|
||||
BindEntity(entity);
|
||||
|
||||
BindLocaleString(entity, d => d.Anathema);
|
||||
BindLocaleString(entity, d => d.Edicts);
|
||||
BindLocaleString(entity, d => d.ReligiousSymbol);
|
||||
BindLocaleString(entity, d => d.SacredAnimal);
|
||||
|
||||
entity
|
||||
.HasMany(e => e.DeityAttributes)
|
||||
.WithOne(e => e.Deity)
|
||||
@@ -461,10 +466,7 @@ public partial class Pf2eDbContext
|
||||
entity.HasMany(e => e.Skills).WithMany();
|
||||
});
|
||||
modelBuilder.Entity<DeityAttribute>(entity => { });
|
||||
modelBuilder.Entity<DeityDomain>(entity =>
|
||||
{
|
||||
// Связь теперь настроена в конфигурации Domain
|
||||
});
|
||||
modelBuilder.Entity<DeityDomain>(entity => { });
|
||||
modelBuilder.Entity<DeitySpell>(entity =>
|
||||
{
|
||||
entity
|
||||
|
||||
Reference in New Issue
Block a user