Clean up Preference.cs
This commit is contained in:
parent
617df5e0e6
commit
e56e2632d1
|
@ -31,18 +31,12 @@ namespace Jellyfin.Data.Entities
|
|||
{
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of this preference.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Identity, Indexed, Required.
|
||||
/// </remarks>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; protected set; }
|
||||
|
||||
|
@ -52,7 +46,6 @@ namespace Jellyfin.Data.Entities
|
|||
/// <remarks>
|
||||
/// Required.
|
||||
/// </remarks>
|
||||
[Required]
|
||||
public PreferenceKind Kind { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -66,27 +59,10 @@ namespace Jellyfin.Data.Entities
|
|||
[StringLength(65535)]
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the row version.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Required, ConcurrencyToken.
|
||||
/// </remarks>
|
||||
/// <inheritdoc/>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="kind">The preference kind.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns>The new instance.</returns>
|
||||
public static Preference Create(PreferenceKind kind, string value)
|
||||
{
|
||||
return new Preference(kind, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user