42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace FinlyticBackend.Entities;
|
|
|
|
/// <summary>
|
|
/// Persisted service configuration setting stored in PostgreSQL.
|
|
/// </summary>
|
|
[Table("service_configurations")]
|
|
public class ServiceConfigurationEntity
|
|
{
|
|
[Key]
|
|
[Column("id")]
|
|
public Guid Id { get; set; } = Guid.NewGuid();
|
|
|
|
[Required]
|
|
[MaxLength(100)]
|
|
[Column("service_name")]
|
|
public string ServiceName { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(100)]
|
|
[Column("config_key")]
|
|
public string ConfigKey { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[Column("config_value")]
|
|
public string ConfigValue { get; set; } = string.Empty;
|
|
|
|
[MaxLength(50)]
|
|
[Column("data_type")]
|
|
public string DataType { get; set; } = "string"; // string, int, double, boolean, json
|
|
|
|
[MaxLength(255)]
|
|
[Column("description")]
|
|
public string Description { get; set; } = string.Empty;
|
|
|
|
[Column("updated_at")]
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|