34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace FinlyticCore.Entities.Settings;
|
|
|
|
public class SettingEntity
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; } = Guid.NewGuid();
|
|
|
|
/// <summary>
|
|
/// Der eindeutige Schlüssel der Einstellung (z.B. "EnableTickerLog" oder "YahooClient.Timeout").
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(150)]
|
|
public string Key { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Der Wert als JSON-String serialisiert.
|
|
/// Erlaubt bool, int, string, Enums oder komplexe Objekte.
|
|
/// </summary>
|
|
[Required]
|
|
[Column(TypeName = "text")]
|
|
public string ValueJson { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Optional: Ermöglicht instanz- oder servicespezifische Settings.
|
|
/// "Global" = gilt für alle, "FundamentalService_Inst1" = spezifisch.
|
|
/// </summary>
|
|
[MaxLength(100)]
|
|
public string ServiceIdentifier { get; set; } = "Global";
|
|
|
|
public DateTime LastUpdatedUtc { get; set; } = DateTime.UtcNow;
|
|
} |