mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-10 20:15:26 -04:00
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com> Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
26 lines
637 B
C#
26 lines
637 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kavita.Models.Entities.Enums;
|
|
using Kavita.Models.Entities.Interfaces;
|
|
|
|
namespace Kavita.Models.Entities;
|
|
|
|
public class ServerSetting : IHasConcurrencyToken
|
|
{
|
|
[Key]
|
|
public required ServerSettingKey Key { get; set; }
|
|
/// <summary>
|
|
/// The value of the Setting. Converter knows how to convert to the correct type
|
|
/// </summary>
|
|
public required string Value { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
[ConcurrencyCheck]
|
|
public uint RowVersion { get; private set; }
|
|
|
|
/// <inheritdoc />
|
|
public void OnSavingChanges()
|
|
{
|
|
RowVersion++;
|
|
}
|
|
}
|