diff options
| author | JPVenson <6794763+JPVenson@users.noreply.github.com> | 2024-10-09 09:53:39 +0000 |
|---|---|---|
| committer | JPVenson <6794763+JPVenson@users.noreply.github.com> | 2024-10-09 09:53:39 +0000 |
| commit | be48cdd9e90ed147c5526ef3fed0624bcbad7741 (patch) | |
| tree | 54a05b60693c7e2fd66bd082e3606ac9d25ac800 /Jellyfin.Data | |
| parent | 15bf43e3adc69fc0ec5413e81a20b1f0d5dccd5c (diff) | |
Naming refactoring and WIP porting of new interface repositories
Diffstat (limited to 'Jellyfin.Data')
| -rw-r--r-- | Jellyfin.Data/Entities/AncestorId.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/AttachmentStreamInfo.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/BaseItemEntity.cs (renamed from Jellyfin.Data/Entities/BaseItem.cs) | 3 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/BaseItemProvider.cs | 23 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/Chapter.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/ItemValue.cs | 23 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/MediaStreamInfo.cs | 2 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/People.cs | 34 |
8 files changed, 80 insertions, 11 deletions
diff --git a/Jellyfin.Data/Entities/AncestorId.cs b/Jellyfin.Data/Entities/AncestorId.cs index dc83b763e..3839b1ae4 100644 --- a/Jellyfin.Data/Entities/AncestorId.cs +++ b/Jellyfin.Data/Entities/AncestorId.cs @@ -13,7 +13,7 @@ public class AncestorId public Guid ItemId { get; set; } - public required BaseItem Item { get; set; } + public required BaseItemEntity Item { get; set; } public string? AncestorIdText { get; set; } } diff --git a/Jellyfin.Data/Entities/AttachmentStreamInfo.cs b/Jellyfin.Data/Entities/AttachmentStreamInfo.cs index 858465424..056d5b05e 100644 --- a/Jellyfin.Data/Entities/AttachmentStreamInfo.cs +++ b/Jellyfin.Data/Entities/AttachmentStreamInfo.cs @@ -7,7 +7,7 @@ public class AttachmentStreamInfo { public required Guid ItemId { get; set; } - public required BaseItem Item { get; set; } + public required BaseItemEntity Item { get; set; } public required int Index { get; set; } diff --git a/Jellyfin.Data/Entities/BaseItem.cs b/Jellyfin.Data/Entities/BaseItemEntity.cs index 0e67a7ca4..92b5caf05 100644 --- a/Jellyfin.Data/Entities/BaseItem.cs +++ b/Jellyfin.Data/Entities/BaseItemEntity.cs @@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Jellyfin.Data.Entities; #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member -public class BaseItem +public class BaseItemEntity { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] @@ -160,6 +160,7 @@ public class BaseItem public long? Size { get; set; } +#pragma warning disable CA2227 // Collection properties should be read only public ICollection<People>? Peoples { get; set; } public ICollection<UserData>? UserData { get; set; } diff --git a/Jellyfin.Data/Entities/BaseItemProvider.cs b/Jellyfin.Data/Entities/BaseItemProvider.cs index 6f8e1c39b..1fc721d6a 100644 --- a/Jellyfin.Data/Entities/BaseItemProvider.cs +++ b/Jellyfin.Data/Entities/BaseItemProvider.cs @@ -5,11 +5,28 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Jellyfin.Data.Entities; +/// <summary> +/// Represents an Key-Value relaten of an BaseItem's provider. +/// </summary> public class BaseItemProvider { + /// <summary> + /// Gets or Sets the reference ItemId. + /// </summary> public Guid ItemId { get; set; } - public required BaseItem Item { get; set; } - public string ProviderId { get; set; } - public string ProviderValue { get; set; } + /// <summary> + /// Gets or Sets the reference BaseItem. + /// </summary> + public required BaseItemEntity Item { get; set; } + + /// <summary> + /// Gets or Sets the ProvidersId. + /// </summary> + public required string ProviderId { get; set; } + + /// <summary> + /// Gets or Sets the Providers Value. + /// </summary> + public required string ProviderValue { get; set; } } diff --git a/Jellyfin.Data/Entities/Chapter.cs b/Jellyfin.Data/Entities/Chapter.cs index ad119d1c6..be353b5da 100644 --- a/Jellyfin.Data/Entities/Chapter.cs +++ b/Jellyfin.Data/Entities/Chapter.cs @@ -10,7 +10,7 @@ public class Chapter { public Guid ItemId { get; set; } - public required BaseItem Item { get; set; } + public required BaseItemEntity Item { get; set; } public required int ChapterIndex { get; set; } diff --git a/Jellyfin.Data/Entities/ItemValue.cs b/Jellyfin.Data/Entities/ItemValue.cs index a3c0908bb..1063aaa8b 100644 --- a/Jellyfin.Data/Entities/ItemValue.cs +++ b/Jellyfin.Data/Entities/ItemValue.cs @@ -5,12 +5,33 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Jellyfin.Data.Entities; +/// <summary> +/// Represents an ItemValue for a BaseItem. +/// </summary> public class ItemValue { + /// <summary> + /// Gets or Sets the reference ItemId. + /// </summary> public Guid ItemId { get; set; } - public required BaseItem Item { get; set; } + /// <summary> + /// Gets or Sets the referenced BaseItem. + /// </summary> + public required BaseItemEntity Item { get; set; } + + /// <summary> + /// Gets or Sets the Type. + /// </summary> public required int Type { get; set; } + + /// <summary> + /// Gets or Sets the Value. + /// </summary> public required string Value { get; set; } + + /// <summary> + /// Gets or Sets the sanatised Value. + /// </summary> public required string CleanValue { get; set; } } diff --git a/Jellyfin.Data/Entities/MediaStreamInfo.cs b/Jellyfin.Data/Entities/MediaStreamInfo.cs index 3b89ca62f..992f33ecf 100644 --- a/Jellyfin.Data/Entities/MediaStreamInfo.cs +++ b/Jellyfin.Data/Entities/MediaStreamInfo.cs @@ -7,7 +7,7 @@ public class MediaStreamInfo { public Guid ItemId { get; set; } - public required BaseItem Item { get; set; } + public required BaseItemEntity Item { get; set; } public int StreamIndex { get; set; } diff --git a/Jellyfin.Data/Entities/People.cs b/Jellyfin.Data/Entities/People.cs index 014a0f1c9..8eb23f5e4 100644 --- a/Jellyfin.Data/Entities/People.cs +++ b/Jellyfin.Data/Entities/People.cs @@ -4,14 +4,44 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Jellyfin.Data.Entities; + +/// <summary> +/// People entity. +/// </summary> public class People { - public Guid ItemId { get; set; } - public BaseItem Item { get; set; } + /// <summary> + /// Gets or Sets The ItemId. + /// </summary> + public required Guid ItemId { get; set; } + + /// <summary> + /// Gets or Sets Reference Item. + /// </summary> + public required BaseItemEntity Item { get; set; } + /// <summary> + /// Gets or Sets the Persons Name. + /// </summary> public required string Name { get; set; } + + /// <summary> + /// Gets or Sets the Role. + /// </summary> public string? Role { get; set; } + + /// <summary> + /// Gets or Sets the Type. + /// </summary> public string? PersonType { get; set; } + + /// <summary> + /// Gets or Sets the SortOrder. + /// </summary> public int? SortOrder { get; set; } + + /// <summary> + /// Gets or Sets the ListOrder. + /// </summary> public int? ListOrder { get; set; } } |
