mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-04 22:24:35 -04:00
Added BaseItem Configuration
This commit is contained in:
parent
2014fa56b8
commit
3dc4024338
@ -16,8 +16,6 @@ public class BaseItemEntity
|
|||||||
|
|
||||||
public string? Data { get; set; }
|
public string? Data { get; set; }
|
||||||
|
|
||||||
public Guid? ParentId { get; set; }
|
|
||||||
|
|
||||||
public string? Path { get; set; }
|
public string? Path { get; set; }
|
||||||
|
|
||||||
public DateTime StartDate { get; set; }
|
public DateTime StartDate { get; set; }
|
||||||
@ -94,8 +92,6 @@ public class BaseItemEntity
|
|||||||
|
|
||||||
public string? UnratedType { get; set; }
|
public string? UnratedType { get; set; }
|
||||||
|
|
||||||
public Guid? TopParentId { get; set; }
|
|
||||||
|
|
||||||
public string? TrailerTypes { get; set; }
|
public string? TrailerTypes { get; set; }
|
||||||
|
|
||||||
public float? CriticRating { get; set; }
|
public float? CriticRating { get; set; }
|
||||||
@ -124,10 +120,6 @@ public class BaseItemEntity
|
|||||||
|
|
||||||
public string? SeasonName { get; set; }
|
public string? SeasonName { get; set; }
|
||||||
|
|
||||||
public Guid? SeasonId { get; set; }
|
|
||||||
|
|
||||||
public Guid? SeriesId { get; set; }
|
|
||||||
|
|
||||||
public string? ExternalSeriesId { get; set; }
|
public string? ExternalSeriesId { get; set; }
|
||||||
|
|
||||||
public string? Tagline { get; set; }
|
public string? Tagline { get; set; }
|
||||||
@ -160,6 +152,22 @@ public class BaseItemEntity
|
|||||||
|
|
||||||
public long? Size { get; set; }
|
public long? Size { get; set; }
|
||||||
|
|
||||||
|
public Guid? ParentId { get; set; }
|
||||||
|
|
||||||
|
public BaseItemEntity? Parent { get; set; }
|
||||||
|
|
||||||
|
public Guid? TopParentId { get; set; }
|
||||||
|
|
||||||
|
public BaseItemEntity? TopParent { get; set; }
|
||||||
|
|
||||||
|
public Guid? SeasonId { get; set; }
|
||||||
|
|
||||||
|
public BaseItemEntity? Season { get; set; }
|
||||||
|
|
||||||
|
public Guid? SeriesId { get; set; }
|
||||||
|
|
||||||
|
public BaseItemEntity? Series { get; set; }
|
||||||
|
|
||||||
#pragma warning disable CA2227 // Collection properties should be read only
|
#pragma warning disable CA2227 // Collection properties should be read only
|
||||||
public ICollection<People>? Peoples { get; set; }
|
public ICollection<People>? Peoples { get; set; }
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ namespace Jellyfin.Data.Entities;
|
|||||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||||
public class Chapter
|
public class Chapter
|
||||||
{
|
{
|
||||||
public Guid ItemId { get; set; }
|
public required Guid ItemId { get; set; }
|
||||||
|
|
||||||
public required BaseItemEntity Item { get; set; }
|
public required BaseItemEntity Item { get; set; }
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class ItemValue
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the reference ItemId.
|
/// Gets or Sets the reference ItemId.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid ItemId { get; set; }
|
public required Guid ItemId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or Sets the referenced BaseItem.
|
/// Gets or Sets the referenced BaseItem.
|
||||||
|
@ -5,7 +5,7 @@ namespace Jellyfin.Data.Entities;
|
|||||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||||
public class MediaStreamInfo
|
public class MediaStreamInfo
|
||||||
{
|
{
|
||||||
public Guid ItemId { get; set; }
|
public required Guid ItemId { get; set; }
|
||||||
|
|
||||||
public required BaseItemEntity Item { get; set; }
|
public required BaseItemEntity Item { get; set; }
|
||||||
|
|
||||||
|
@ -13,7 +13,19 @@ public class BaseItemConfiguration : IEntityTypeConfiguration<BaseItemEntity>
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Configure(EntityTypeBuilder<BaseItemEntity> builder)
|
public void Configure(EntityTypeBuilder<BaseItemEntity> builder)
|
||||||
{
|
{
|
||||||
builder.HasNoKey();
|
builder.HasKey(e => e.Id);
|
||||||
|
builder.HasOne(e => e.Parent);
|
||||||
|
builder.HasOne(e => e.TopParent);
|
||||||
|
builder.HasOne(e => e.Season);
|
||||||
|
builder.HasOne(e => e.Series);
|
||||||
|
builder.HasMany(e => e.Peoples);
|
||||||
|
builder.HasMany(e => e.UserData);
|
||||||
|
builder.HasMany(e => e.ItemValues);
|
||||||
|
builder.HasMany(e => e.MediaStreams);
|
||||||
|
builder.HasMany(e => e.Chapters);
|
||||||
|
builder.HasMany(e => e.Provider);
|
||||||
|
builder.HasMany(e => e.AncestorIds);
|
||||||
|
|
||||||
builder.HasIndex(e => e.Path);
|
builder.HasIndex(e => e.Path);
|
||||||
builder.HasIndex(e => e.ParentId);
|
builder.HasIndex(e => e.ParentId);
|
||||||
builder.HasIndex(e => e.PresentationUniqueKey);
|
builder.HasIndex(e => e.PresentationUniqueKey);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user