Files
Pf2eDataScrapper/Pf2eModel/Model/Base/EntityAlias.cs
T

25 lines
638 B
C#

using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using Pf2eModel.Model.Enum;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Pf2eModel.Model.Base;
[PrimaryKey(nameof(EntityId), nameof(Type))]
public partial class EntityAlias
{
[Column(Order = 1)]
public int EntityId { get; set; }
[Column(Order = 2)]
public AliasType Type { get; set; } = AliasType.Other;
[Column(Order = 3)]
[MaxLength(Pf2eDbContext.NameLength)]
public string Alias { get; set; } = null!;
[JsonIgnore]
public virtual Entity Entity { get; set; } = null!;
}