Вынесение модели в отдельный проект
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Pf2eModel.Model.Base.Keywords;
|
||||
using Pf2eModel.Model.Base.Source;
|
||||
using Pf2eModel.Model.Base.Targets;
|
||||
using Pf2eModel.Model.Enum;
|
||||
using Pf2eModel.Model.Structure;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Pf2eModel.Model.Base;
|
||||
|
||||
public class Entity
|
||||
{
|
||||
[System.ComponentModel.DataAnnotations.Key]
|
||||
[Column(Order = 1)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column(Order = 2)]
|
||||
[MaxLength(Pf2eDbContext.NameLength)]
|
||||
[Comment("Отображаемое имя")]
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
[Column(Order = 3)]
|
||||
[Comment("Тип объекта")]
|
||||
public EntityType Type { get; set; }
|
||||
|
||||
[Column(Order = 4)]
|
||||
[MaxLength(Pf2eDbContext.NameLength)]
|
||||
[Comment("Часть имени в URL")]
|
||||
public string Slug { get; set; } = null!;
|
||||
|
||||
[Column(Order = 5)]
|
||||
[StringLength(255)]
|
||||
[Comment("Изображение объекта")]
|
||||
public string Img { get; set; } = null!;
|
||||
|
||||
[Column(Order = 6)]
|
||||
[Comment("Текстовое описание объекта")]
|
||||
public string Description { get; set; } = null!;
|
||||
|
||||
[Column(Order = 7)]
|
||||
public EntityRarity Rarity { get; set; } = EntityRarity.Common;
|
||||
|
||||
[Column(Order = 8)]
|
||||
[Comment("Флаг, указывающий, что у объекта существует перевод")]
|
||||
public bool? IsTranslated { get; set; } = false;
|
||||
|
||||
[Column(Order = 9)]
|
||||
[Comment("Флаг, указывающий, что объект был проверен и не требует автоматической перезаписи")]
|
||||
public bool? IsChecked { get; set; } = false;
|
||||
|
||||
public virtual ICollection<Trait> Traits { get; set; } = [];
|
||||
|
||||
public virtual ICollection<Keyword> Keywords { get; set; } = [];
|
||||
|
||||
public virtual ICollection<EntityAlias> Aliases { get; set; } = [];
|
||||
|
||||
public virtual ICollection<EntitySource> Sources { get; set; } = [];
|
||||
|
||||
public virtual ICollection<EntityExternal> Externals { get; set; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user