Большой рефактор
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Pf2eModel.Model.Common.I18n;
|
||||
|
||||
namespace Pf2eModel.Model.Base.Keywords;
|
||||
|
||||
public partial class Keyword
|
||||
public class Keyword
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -11,10 +12,14 @@ public partial class Keyword
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column(Order = 2)]
|
||||
public LocaleString Name = [];
|
||||
|
||||
[Column(Order = 3)]
|
||||
[MaxLength(Pf2eDbContext.NameLength)]
|
||||
public string Slug { get; set; } = null!;
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public virtual ICollection<Entity> Entities { get; set; } = [];
|
||||
public ICollection<Entity> Entities { get; set; } = [];
|
||||
|
||||
public virtual ICollection<KeywordAlias> Aliases { get; set; } = [];
|
||||
public ICollection<KeywordAlias> Aliases { get; set; } = [];
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Base.Keywords;
|
||||
|
||||
public partial class KeywordAlias
|
||||
public class KeywordAlias
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -18,5 +18,5 @@ public partial class KeywordAlias
|
||||
public string Value { get; set; } = null!;
|
||||
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
public virtual Keyword Keyword { get; set; } = null!;
|
||||
public Keyword Keyword { get; set; } = null!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user