aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/src/Models/Database/BaseWithOwner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'code/api/src/Models/Database/BaseWithOwner.cs')
-rw-r--r--code/api/src/Models/Database/BaseWithOwner.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/code/api/src/Models/Database/BaseWithOwner.cs b/code/api/src/Models/Database/BaseWithOwner.cs
index ad9b33a..7e9f6c1 100644
--- a/code/api/src/Models/Database/BaseWithOwner.cs
+++ b/code/api/src/Models/Database/BaseWithOwner.cs
@@ -3,10 +3,14 @@ namespace IOL.GreatOffice.Api.Data.Database;
/// <summary>
/// Base class for all entities with ownership.
/// </summary>
-public class BaseWithOwner : Base
+public abstract class BaseWithOwner : Base
{
protected BaseWithOwner() { }
+ protected BaseWithOwner(Guid createdBy) {
+ CreatedBy = createdBy;
+ }
+
protected BaseWithOwner(LoggedInUserModel loggedInUser) {
CreatedBy = loggedInUser.Id;
}
@@ -21,12 +25,12 @@ public class BaseWithOwner : Base
public void SetDeleted(Guid userId) {
DeletedBy = userId;
- SetDeleted();
+ base.SetDeleted();
}
public void SetModified(Guid userId) {
ModifiedBy = userId;
- SetModified();
+ base.SetModified();
}
public void SetOwnerIds(Guid userId = default, Guid tenantId = default) {