-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDatabaseSettings.cs
More file actions
45 lines (39 loc) · 1.42 KB
/
DatabaseSettings.cs
File metadata and controls
45 lines (39 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Aquiis.Core.Entities
{
/// <summary>
/// Database-level settings that affect all organizations.
/// These are runtime configuration values stored in the database itself.
/// </summary>
public class DatabaseSettings
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
/// <summary>
/// Database encryption status - applies to the entire SQLite file
/// </summary>
[Required]
public bool DatabaseEncryptionEnabled { get; set; } = false;
/// <summary>
/// When encryption status was last changed
/// </summary>
public DateTime? EncryptionChangedOn { get; set; }
/// <summary>
/// Salt used for password-derived key (base64 encoded)
/// Required for portable encryption - same password + salt = same key
/// </summary>
[StringLength(256)]
public string? EncryptionSalt { get; set; }
/// <summary>
/// Last time settings were modified
/// </summary>
public DateTime LastModifiedOn { get; set; } = DateTime.UtcNow;
/// <summary>
/// User or system that last modified settings
/// </summary>
[StringLength(128)]
public string LastModifiedBy { get; set; } = "System";
}
}