From b7e39b59fd0fc7b5610ebff29035bf622079e0d8 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 5 Oct 2022 20:45:21 +0800 Subject: refactor: Change file structure --- code/api/src/Data/Database/BaseWithOwner.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 code/api/src/Data/Database/BaseWithOwner.cs (limited to 'code/api/src/Data/Database/BaseWithOwner.cs') diff --git a/code/api/src/Data/Database/BaseWithOwner.cs b/code/api/src/Data/Database/BaseWithOwner.cs new file mode 100644 index 0000000..1eb99f4 --- /dev/null +++ b/code/api/src/Data/Database/BaseWithOwner.cs @@ -0,0 +1,19 @@ +namespace IOL.GreatOffice.Api.Data.Database; + +/// +/// Base class for all entities. +/// +public class BaseWithOwner : Base +{ + protected BaseWithOwner() { } + + protected BaseWithOwner(Guid userId) { + UserId = userId; + } + + public Guid? UserId { get; set; } + public Guid? TenantId { get; init; } + public Guid? ModifiedById { get; init; } + public Guid? CreatedById { get; init; } + public Guid? DeletedById { get; init; } +} \ No newline at end of file -- cgit v1.3