summaryrefslogtreecommitdiffstats
path: root/server/src/Data/Database/BaseWithOwner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/Data/Database/BaseWithOwner.cs')
-rw-r--r--server/src/Data/Database/BaseWithOwner.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/server/src/Data/Database/BaseWithOwner.cs b/server/src/Data/Database/BaseWithOwner.cs
new file mode 100644
index 0000000..eb4438d
--- /dev/null
+++ b/server/src/Data/Database/BaseWithOwner.cs
@@ -0,0 +1,24 @@
+namespace IOL.GreatOffice.Api.Data.Database;
+
+/// <summary>
+/// Base class for all entities.
+/// </summary>
+public class BaseWithOwner : Base
+{
+ protected BaseWithOwner() { }
+
+ protected BaseWithOwner(Guid userId) {
+ UserId = userId;
+ }
+
+ public Guid UserId { get; init; }
+ public User User { get; init; }
+ public Guid TenantId { get; set; }
+ public Tenant Tenant { get; init; }
+ public Guid ModifiedById { get; init; }
+ public User ModifiedBy { get; set; }
+ public Guid CreatedById { get; init; }
+ public User CreatedBy { get; set; }
+ public Guid DeletedById { get; init; }
+ public User DeletedBy { get; set; }
+}