aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Database/Jellyfin.Database.Implementations/Entities/LinkedChildEntity.cs
blob: 736177571105d554b235c039c102a907f8bfbeaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;

namespace Jellyfin.Database.Implementations.Entities;

/// <summary>
/// Represents a linked child relationship between items (e.g., BoxSet to Movies, Playlist to tracks).
/// </summary>
public class LinkedChildEntity
{
    /// <summary>
    /// Gets or sets the parent item ID (BoxSet, Playlist, etc.).
    /// </summary>
    public required Guid ParentId { get; set; }

    /// <summary>
    /// Gets or sets the child item ID.
    /// </summary>
    public required Guid ChildId { get; set; }

    /// <summary>
    /// Gets or sets the type of linked child (Manual or Shortcut).
    /// </summary>
    public required LinkedChildType ChildType { get; set; }

    /// <summary>
    /// Gets or sets the sort order.
    /// </summary>
    public int? SortOrder { get; set; }

    /// <summary>
    /// Gets or sets the parent item navigation property.
    /// </summary>
    public BaseItemEntity? Parent { get; set; }

    /// <summary>
    /// Gets or sets the child item navigation property.
    /// </summary>
    public BaseItemEntity? Child { get; set; }
}