Обработка через CSharper

This commit is contained in:
2025-04-24 18:10:05 +04:00
parent cc7e97b6ff
commit 7dcf582c3e
89 changed files with 377 additions and 324 deletions
+3 -3
View File
@@ -1,12 +1,12 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Pf2eModel.Model.Base.Keywords;
using Pf2eModel.Model.Base.Source;
using Pf2eModel.Model.Base.Targets;
using Pf2eModel.Model.Common.I18n;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Base;
-1
View File
@@ -17,5 +17,4 @@ public partial class Keyword
public virtual ICollection<Entity> Entities { get; set; } = [];
public virtual ICollection<KeywordAlias> Aliases { get; set; } = [];
}
+2 -2
View File
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Pf2eModel.Model.Base.Source;
+2 -3
View File
@@ -1,6 +1,6 @@
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Base.Source;
@@ -21,7 +21,6 @@ public partial class Source
[Column(Order = 4)]
public DateOnly? ReleaseDate { get; set; }
[Newtonsoft.Json.JsonIgnore]
public ICollection<EntitySource> EntitySources { get; set; } = [];
}
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Pf2eModel.Model.Base.Targets;
+2 -1
View File
@@ -6,5 +6,6 @@ public class LocaleItem(LocaleType type, string value)
public string Value { get; set; } = value;
public LocaleItem(KeyValuePair<string, string> item) : this(LocaleExtension.GetTypeByString(item.Key), item.Value) { }
public LocaleItem(KeyValuePair<string, string> item)
: this(LocaleExtension.GetTypeByString(item.Key), item.Value) { }
}
+2 -2
View File
@@ -1,6 +1,6 @@
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Common;
+1 -5
View File
@@ -15,10 +15,6 @@ public enum ActionCategory
[PgName("class-feat")]
ClassFeat,
[PgName("offensive")]
Offensive,
@@ -45,4 +41,4 @@ public enum ActionCategory
[PgName("kingdom_feature")]
KingdomFeature,
}
}
+1 -1
View File
@@ -12,4 +12,4 @@ public enum AncestryVision
[PgName("dark-vision")]
DarkVision,
}
}
+1 -1
View File
@@ -23,5 +23,5 @@ public enum AttributeValues
Wisdom,
[PgName("cha")]
Charisma
Charisma,
}
+2 -3
View File
@@ -2,7 +2,6 @@
namespace Pf2eModel.Model.Enum;
public enum ConditionGroup
{
[PgName("unknown")]
@@ -21,5 +20,5 @@ public enum ConditionGroup
Attitudes,
[PgName("detection")]
Detection
}
Detection,
}
+1 -1
View File
@@ -12,4 +12,4 @@ public enum DeitySanctification
[PgName("any")]
Any,
}
}
+1 -1
View File
@@ -14,5 +14,5 @@ public enum EntityRarity
Rare,
[PgName("unique")]
Unique
Unique,
}
+2 -2
View File
@@ -47,5 +47,5 @@ public enum EntityType
Spell,
[PgName("language")]
Language
}
Language,
}
+1 -1
View File
@@ -42,4 +42,4 @@ public enum FeatCategory
[PgName("campaign-feature")]
CampaignFeature,
}
}
+1 -1
View File
@@ -15,4 +15,4 @@ public enum Size
[PgName("large")]
Large,
}
}
+1
View File
@@ -1,6 +1,7 @@
using NpgsqlTypes;
namespace Pf2eModel.Model.Enum;
public enum SourceCategory
{
[PgName("rulebook")]
+1 -1
View File
@@ -24,4 +24,4 @@ public enum SpellAreaType
[PgName("cylinder")]
Cylinder,
}
}
+1 -1
View File
@@ -9,4 +9,4 @@ public enum SpellDamageCategory
[PgName("splash")]
Splash,
}
}
+1 -1
View File
@@ -12,4 +12,4 @@ public enum SpellDamageKinds
[PgName("any")]
Any,
}
}
+1 -1
View File
@@ -21,4 +21,4 @@ public enum SpellTradition
[PgName("all")]
All,
}
}
+1
View File
@@ -1,4 +1,5 @@
namespace Pf2eModel.Model.Enum;
public enum TrainingStage
{
Untrained = 0,
+1
View File
@@ -1,6 +1,7 @@
using NpgsqlTypes;
namespace Pf2eModel.Model.Enum;
public enum TrainingType
{
[PgName("perception")]
+1 -1
View File
@@ -11,5 +11,5 @@ public enum TraitType
Class,
[PgName("tradition")]
Tradition
Tradition,
}
-1
View File
@@ -9,5 +9,4 @@ public interface IEntity
[JsonIgnore]
public Entity Entity { get; set; }
}
+2 -3
View File
@@ -1,6 +1,6 @@
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
@@ -30,6 +30,5 @@ public partial class Action : IEntity
[Column(Order = 6)]
public string? Extra { get; set; }
public Entity Entity { get; set; } = null!;
}
+2 -2
View File
@@ -1,7 +1,7 @@
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.AncestryRelation;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
@@ -1,6 +1,6 @@
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace Pf2eModel.Model.Structure.AncestryRelation;
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure.AncestryRelation;
@@ -1,5 +1,5 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Pf2eModel.Model.Structure.AncestryRelation;
+3 -3
View File
@@ -1,8 +1,8 @@
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.BackgroundRelation;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure.BackgroundRelation;
@@ -1,7 +1,7 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure.BackgroundRelation;
@@ -1,8 +1,8 @@
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Pf2eModel.Model.Common;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure.BackgroundRelation;
+3 -3
View File
@@ -1,8 +1,8 @@
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.ClassRelation;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
@@ -1,7 +1,7 @@
using Newtonsoft.Json;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure.ClassRelation;
@@ -1,10 +1,11 @@
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure.ClassRelation;
public partial class ClassProgression
{
[Key]
@@ -1,8 +1,8 @@
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Pf2eModel.Model.Common;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure.ClassRelation;
+3 -3
View File
@@ -1,7 +1,7 @@
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure;
+5 -4
View File
@@ -1,9 +1,9 @@
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Common;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.DeityRelation;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
@@ -29,7 +29,8 @@ public partial class Deity : IEntity
[Column(Order = 5)]
public bool SanctificationMust { get; set; }
public virtual ICollection<DeityAttribute> DeityAttributes { get; set; } = new List<DeityAttribute>();
public virtual ICollection<DeityAttribute> DeityAttributes { get; set; } =
new List<DeityAttribute>();
public virtual ICollection<DeityDomain> DeityDomains { get; set; } = new List<DeityDomain>();
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure.DeityRelation;
+3 -4
View File
@@ -1,8 +1,8 @@
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.FeatRelation;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
@@ -37,7 +37,6 @@ public partial class Feat : IEntity
[Column(Order = 9)]
public bool IsPassive { get; set; } = false;
[Column(Order = 10)]
public string? Extra { get; set; }
+3 -3
View File
@@ -1,7 +1,7 @@
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure;
+3 -3
View File
@@ -1,8 +1,8 @@
using Pf2eModel.Model.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using Pf2eModel.Model.Structure.SpellRelation;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Structure;
@@ -1,6 +1,6 @@
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure.SpellRelation;
@@ -1,6 +1,6 @@
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure.SpellRelation;
+3 -3
View File
@@ -1,7 +1,7 @@
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pf2eModel.Model.Base;
using Pf2eModel.Model.Enum;
namespace Pf2eModel.Model.Structure;