Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add sync support to client database (#186)

Leendert de Borst89751633f107
diff --git a/src/Databases/AliasClientDb/Abstracts/SyncableEntity.cs b/src/Databases/AliasClientDb/Abstracts/SyncableEntity.cs
new file mode 100644
index 000000000..039a76d58
--- /dev/null
+++ b/src/Databases/AliasClientDb/Abstracts/SyncableEntity.cs
@@ -0,0 +1,43 @@
+//-----------------------------------------------------------------------
+// <copyright file="SyncableEntity.cs" company="lanedirt">
+// Copyright (c) lanedirt. All rights reserved.
+// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
+// </copyright>
+//-----------------------------------------------------------------------
+namespace AliasClientDb.Abstracts;
+
+using System.ComponentModel.DataAnnotations;
+
+/// <summary>
+/// Represents an abstract base class for entities that support vault synchronization.
+/// This class provides properties for tracking creation, updates, and soft deletes,
+/// which are essential for merging conflicting vault versions across multiple clients.
+/// </summary>
+public abstract class SyncableEntity
+{
+ /// <summary>
+ /// Gets or sets the created timestamp.
+ /// </summary>
+ [Required]
+ public DateTime CreatedAt { get; set; }
+
+ /// <summary>
+ /// Gets or sets the last modified timestamp of the record.
+ /// This timestamp is used for synchronization and conflict resolution when
+ /// merging changes from multiple clients. It enables a "last write wins" strategy
+ /// during the sync process, ensuring the most recent version of a record is preserved.
+ /// </summary>
+ [Required]
+ public DateTime UpdatedAt { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this record is marked for deletion.
+ /// Records marked as deleted are not returned in regular queries but are retained
+ /// for a specified period to ensure proper synchronization across devices.
+ /// This "soft delete" approach allows for conflict resolution during sync and
+ /// prevents data loss. After the retention period (configurable in the system),
+ /// these records are permanently removed during the cleanup process.
+ /// </summary>
+ [Required]
+ public bool IsDeleted { get; set; }
+}
diff --git a/src/Databases/AliasClientDb/Alias.cs b/src/Databases/AliasClientDb/Alias.cs
index bbd6d2798..bfa157803 100644
--- a/src/Databases/AliasClientDb/Alias.cs
+++ b/src/Databases/AliasClientDb/Alias.cs
@@ -4,15 +4,17 @@
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------
+
namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using AliasClientDb.Abstracts;
/// <summary>
/// The alias entity.
/// </summary>
-public class Alias
+public class Alias : SyncableEntity
{
/// <summary>
/// Gets or sets the alias primary key.
@@ -59,16 +61,6 @@ public class Alias
[StringLength(255)]
public string? Email { get; set; }
- /// <summary>
- /// Gets or sets the created timestamp.
- /// </summary>
- public DateTime CreatedAt { get; set; }
-
- /// <summary>
- /// Gets or sets the updated timestamp.
- /// </summary>
- public DateTime UpdatedAt { get; set; }
-
/// <summary>
/// Gets or sets the credential objects.
/// </summary>
diff --git a/src/Databases/AliasClientDb/AliasClientDb.csproj b/src/Databases/AliasClientDb/AliasClientDb.csproj
index 2ef1d40d6..e5040dec1 100644
--- a/src/Databases/AliasClientDb/AliasClientDb.csproj
+++ b/src/Databases/AliasClientDb/AliasClientDb.csproj
@@ -42,8 +42,4 @@
</AdditionalFiles>
</ItemGroup>
- <ItemGroup>
- <Folder Include="Migrations\" />
- </ItemGroup>
-
</Project>
diff --git a/src/Databases/AliasClientDb/Attachment.cs b/src/Databases/AliasClientDb/Attachment.cs
index 2f2ae5855..3e4d547dd 100644
--- a/src/Databases/AliasClientDb/Attachment.cs
+++ b/src/Databases/AliasClientDb/Attachment.cs
@@ -9,11 +9,12 @@ namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using AliasClientDb.Abstracts;
/// <summary>
/// Attachment entity.
/// </summary>
-public class Attachment
+public class Attachment : SyncableEntity
{
/// <summary>
/// Gets or sets the attachment primary key.
@@ -32,16 +33,6 @@ public class Attachment
/// </summary>
public byte[] Blob { get; set; } = null!;
- /// <summary>
- /// Gets or sets the created timestamp.
- /// </summary>
- public DateTime CreatedAt { get; set; }
-
- /// <summary>
- /// Gets or sets the updated timestamp.
- /// </summary>
- public DateTime UpdatedAt { get; set; }
-
/// <summary>
/// Gets or sets the credential foreign key.
/// </summary>
diff --git a/src/Databases/AliasClientDb/Credential.cs b/src/Databases/AliasClientDb/Credential.cs
index db3a3becc..cfc7f1b07 100644
--- a/src/Databases/AliasClientDb/Credential.cs
+++ b/src/Databases/AliasClientDb/Credential.cs
@@ -4,15 +4,17 @@
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------
+
namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using AliasClientDb.Abstracts;
/// <summary>
/// Login object.
/// </summary>
-public class Credential
+public class Credential : SyncableEntity
{
/// <summary>
/// Gets or sets Login ID.
@@ -51,16 +53,6 @@ public class Credential
/// </summary>
public virtual ICollection<Attachment> Attachments { get; set; } = [];
- /// <summary>
- /// Gets or sets created timestamp.
- /// </summary>
- public DateTime CreatedAt { get; set; }
-
- /// <summary>
- /// Gets or sets updated timestamp.
- /// </summary>
- public DateTime UpdatedAt { get; set; }
-
/// <summary>
/// Gets or sets the service ID foreign key.
/// </summary>
diff --git a/src/Databases/AliasClientDb/EncryptionKey.cs b/src/Databases/AliasClientDb/EncryptionKey.cs
index 8afe07aa4..7a718a2c9 100644
--- a/src/Databases/AliasClientDb/EncryptionKey.cs
+++ b/src/Databases/AliasClientDb/EncryptionKey.cs
@@ -4,14 +4,16 @@
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------
+
namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
+using AliasClientDb.Abstracts;
/// <summary>
/// The EncryptionKey entity.
/// </summary>
-public class EncryptionKey
+public class EncryptionKey : SyncableEntity
{
/// <summary>
/// Gets or sets the encryption key primary key.
@@ -35,14 +37,4 @@ public class EncryptionKey
/// Gets or sets a value indicating whether this public/private key is the primary key to use by default.
/// </summary>
public bool IsPrimary { get; set; }
-
- /// <summary>
- /// Gets or sets the created timestamp.
- /// </summary>
- public DateTime CreatedAt { get; set; }
-
- /// <summary>
- /// Gets or sets the updated timestamp.
- /// </summary>
- public DateTime UpdatedAt { get; set; }
}
diff --git a/src/Databases/AliasClientDb/Migrations/20240916105320_1.4.0-AddSyncSupport.Designer.cs b/src/Databases/AliasClientDb/Migrations/20240916105320_1.4.0-AddSyncSupport.Designer.cs
new file mode 100644
index 000000000..ae2e6ed7f
--- /dev/null
+++ b/src/Databases/AliasClientDb/Migrations/20240916105320_1.4.0-AddSyncSupport.Designer.cs
@@ -0,0 +1,316 @@
+// <auto-generated />
+using System;
+using AliasClientDb;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace AliasClientDb.Migrations
+{
+ [DbContext(typeof(AliasClientDbContext))]
+ [Migration("20240916105320_1.4.0-AddSyncSupport")]
+ partial class _140AddSyncSupport
+ {
+ /// <inheritdoc />
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.8")
+ .HasAnnotation("Proxies:ChangeTracking", false)
+ .HasAnnotation("Proxies:CheckEquality", false)
+ .HasAnnotation("Proxies:LazyLoading", true);
+
+ modelBuilder.Entity("AliasClientDb.Alias", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("BirthDate")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Email")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property<string>("FirstName")
+ .HasMaxLength(255)
+ .HasColumnType("VARCHAR");
+
+ b.Property<string>("Gender")
+ .HasMaxLength(255)
+ .HasColumnType("VARCHAR");
+
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("LastName")
+ .HasMaxLength(255)
+ .HasColumnType("VARCHAR");
+
+ b.Property<string>("NickName")
+ .HasMaxLength(255)
+ .HasColumnType("VARCHAR");
+
+ b.Property<DateTime>("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("Aliases");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Attachment", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<byte[]>("Blob")
+ .IsRequired()
+ .HasColumnType("BLOB");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<Guid>("CredentialId")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Filename")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CredentialId");
+
+ b.ToTable("Attachment");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Credential", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<Guid>("AliasId")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Notes")
+ .HasColumnType("TEXT");
+
+ b.Property<Guid>("ServiceId")
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Username")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AliasId");
+
+ b.HasIndex("ServiceId");
+
+ b.ToTable("Credentials");
+ });
+
+ modelBuilder.Entity("AliasClientDb.EncryptionKey", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property<bool>("IsPrimary")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("PrivateKey")
+ .IsRequired()
+ .HasMaxLength(2000)
+ .HasColumnType("TEXT");
+
+ b.Property<string>("PublicKey")
+ .IsRequired()
+ .HasMaxLength(2000)
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("EncryptionKeys");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Password", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<Guid>("CredentialId")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Value")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CredentialId");
+
+ b.ToTable("Passwords");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Service", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property<byte[]>("Logo")
+ .HasColumnType("BLOB");
+
+ b.Property<string>("Name")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Url")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("Services");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Setting", b =>
+ {
+ b.Property<string>("Key")
+ .HasMaxLength(255)
+ .HasColumnType("TEXT");
+
+ b.Property<DateTime>("CreatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("UpdatedAt")
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Value")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Key");
+
+ b.ToTable("Settings");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Attachment", b =>
+ {
+ b.HasOne("AliasClientDb.Credential", "Credential")
+ .WithMany("Attachments")
+ .HasForeignKey("CredentialId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Credential");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Credential", b =>
+ {
+ b.HasOne("AliasClientDb.Alias", "Alias")
+ .WithMany("Credentials")
+ .HasForeignKey("AliasId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("AliasClientDb.Service", "Service")
+ .WithMany("Credentials")
+ .HasForeignKey("ServiceId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Alias");
+
+ b.Navigation("Service");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Password", b =>
+ {
+ b.HasOne("AliasClientDb.Credential", "Credential")
+ .WithMany("Passwords")
+ .HasForeignKey("CredentialId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Credential");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Alias", b =>
+ {
+ b.Navigation("Credentials");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Credential", b =>
+ {
+ b.Navigation("Attachments");
+
+ b.Navigation("Passwords");
+ });
+
+ modelBuilder.Entity("AliasClientDb.Service", b =>
+ {
+ b.Navigation("Credentials");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/Databases/AliasClientDb/Migrations/20240916105320_1.4.0-AddSyncSupport.cs b/src/Databases/AliasClientDb/Migrations/20240916105320_1.4.0-AddSyncSupport.cs
new file mode 100644
index 000000000..9e34a0ff1
--- /dev/null
+++ b/src/Databases/AliasClientDb/Migrations/20240916105320_1.4.0-AddSyncSupport.cs
@@ -0,0 +1,96 @@
+// <auto-generated />
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace AliasClientDb.Migrations
+{
+ /// <inheritdoc />
+ public partial class _140AddSyncSupport : Migration
+ {
+ /// <inheritdoc />
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn<bool>(
+ name: "IsDeleted",
+ table: "Settings",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn<bool>(
+ name: "IsDeleted",
+ table: "Services",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn<bool>(
+ name: "IsDeleted",
+ table: "Passwords",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn<bool>(
+ name: "IsDeleted",
+ table: "EncryptionKeys",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn<bool>(
+ name: "IsDeleted",
+ table: "Credentials",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn<bool>(
+ name: "IsDeleted",
+ table: "Attachment",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn<bool>(
+ name: "IsDeleted",
+ table: "Aliases",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: false);
+ }
+
+ /// <inheritdoc />
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "Settings");
+
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "Services");
+
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "Passwords");
+
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "EncryptionKeys");
+
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "Credentials");
+
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "Attachment");
+
+ migrationBuilder.DropColumn(
+ name: "IsDeleted",
+ table: "Aliases");
+ }
+ }
+}
diff --git a/src/Databases/AliasClientDb/Migrations/AliasClientDbContextModelSnapshot.cs b/src/Databases/AliasClientDb/Migrations/AliasClientDbContextModelSnapshot.cs
index 66d5c317b..966f627ec 100644
--- a/src/Databases/AliasClientDb/Migrations/AliasClientDbContextModelSnapshot.cs
+++ b/src/Databases/AliasClientDb/Migrations/AliasClientDbContextModelSnapshot.cs
@@ -16,7 +16,7 @@ namespace AliasClientDb.Migrations
{
#pragma warning disable 612, 618
modelBuilder
- .HasAnnotation("ProductVersion", "8.0.7")
+ .HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Proxies:ChangeTracking", false)
.HasAnnotation("Proxies:CheckEquality", false)
.HasAnnotation("Proxies:LazyLoading", true);
@@ -45,6 +45,9 @@ namespace AliasClientDb.Migrations
.HasMaxLength(255)
.HasColumnType("VARCHAR");
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
b.Property<string>("LastName")
.HasMaxLength(255)
.HasColumnType("VARCHAR");
@@ -82,6 +85,9 @@ namespace AliasClientDb.Migrations
.HasMaxLength(255)
.HasColumnType("TEXT");
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
@@ -104,6 +110,9 @@ namespace AliasClientDb.Migrations
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
b.Property<string>("Notes")
.HasColumnType("TEXT");
@@ -134,6 +143,9 @@ namespace AliasClientDb.Migrations
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
b.Property<bool>("IsPrimary")
.HasColumnType("INTEGER");
@@ -167,6 +179,9 @@ namespace AliasClientDb.Migrations
b.Property<Guid>("CredentialId")
.HasColumnType("TEXT");
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
@@ -190,6 +205,9 @@ namespace AliasClientDb.Migrations
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
b.Property<byte[]>("Logo")
.HasColumnType("BLOB");
@@ -218,6 +236,9 @@ namespace AliasClientDb.Migrations
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
+ b.Property<bool>("IsDeleted")
+ .HasColumnType("INTEGER");
+
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT");
diff --git a/src/Databases/AliasClientDb/Password.cs b/src/Databases/AliasClientDb/Password.cs
index b897a9d1a..75d3f57f5 100644
--- a/src/Databases/AliasClientDb/Password.cs
+++ b/src/Databases/AliasClientDb/Password.cs
@@ -9,11 +9,12 @@ namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
+using AliasClientDb.Abstracts;
/// <summary>
/// Password entity.
/// </summary>
-public class Password
+public class Password : SyncableEntity
{
/// <summary>
/// Gets or sets the password primary key.
@@ -27,16 +28,6 @@ public class Password
[StringLength(255)]
public string? Value { get; set; }
- /// <summary>
- /// Gets or sets the created timestamp.
- /// </summary>
- public DateTime CreatedAt { get; set; }
-
- /// <summary>
- /// Gets or sets the updated timestamp.
- /// </summary>
- public DateTime UpdatedAt { get; set; }
-
/// <summary>
/// Gets or sets the credential foreign key.
/// </summary>
diff --git a/src/Databases/AliasClientDb/Service.cs b/src/Databases/AliasClientDb/Service.cs
index 927970d59..c5a16f93b 100644
--- a/src/Databases/AliasClientDb/Service.cs
+++ b/src/Databases/AliasClientDb/Service.cs
@@ -4,14 +4,16 @@
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------
+
namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
+using AliasClientDb.Abstracts;
/// <summary>
/// The service entity.
/// </summary>
-public class Service
+public class Service : SyncableEntity
{
/// <summary>
/// Gets or sets the service primary key.
@@ -36,16 +38,6 @@ public class Service
/// </summary>
public byte[]? Logo { get; set; } = null;
- /// <summary>
- /// Gets or sets the created timestamp.
- /// </summary>
- public DateTime CreatedAt { get; set; }
-
- /// <summary>
- /// Gets or sets the updated timestamp.
- /// </summary>
- public DateTime UpdatedAt { get; set; }
-
/// <summary>
/// Gets or sets the credential objects.
/// </summary>
diff --git a/src/Databases/AliasClientDb/Setting.cs b/src/Databases/AliasClientDb/Setting.cs
index 2bbff8946..6f7112ec6 100644
--- a/src/Databases/AliasClientDb/Setting.cs
+++ b/src/Databases/AliasClientDb/Setting.cs
@@ -4,14 +4,16 @@
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
// </copyright>
//-----------------------------------------------------------------------
+
namespace AliasClientDb;
using System.ComponentModel.DataAnnotations;
+using AliasClientDb.Abstracts;
/// <summary>
/// The service entity.
/// </summary>
-public class Setting
+public class Setting : SyncableEntity
{
/// <summary>
/// Gets or sets the setting key which is also the primary unique key.
@@ -25,14 +27,4 @@ public class Setting
/// via serialization.
/// </summary>
public string? Value { get; set; }
-
- /// <summary>
- /// Gets or sets the created timestamp.
- /// </summary>
- public DateTime CreatedAt { get; set; }
-
- /// <summary>
- /// Gets or sets the updated timestamp.
- /// </summary>
- public DateTime UpdatedAt { get; set; }
}