aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/Data/Database/ApiAccessToken.cs
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-10-05 14:45:21 +0200
committerivarlovlie <git@ivarlovlie.no>2022-10-05 14:45:21 +0200
commitb7e39b59fd0fc7b5610ebff29035bf622079e0d8 (patch)
tree64be84ebbdac9f7ceced983390c53b10d575af5c /server/src/Data/Database/ApiAccessToken.cs
parent2001c035fbb417ab0a3d42cfb04d17420bde4086 (diff)
downloadgreatoffice-b7e39b59fd0fc7b5610ebff29035bf622079e0d8.tar.xz
greatoffice-b7e39b59fd0fc7b5610ebff29035bf622079e0d8.zip
refactor: Change file structure
Diffstat (limited to 'server/src/Data/Database/ApiAccessToken.cs')
-rw-r--r--server/src/Data/Database/ApiAccessToken.cs31
1 files changed, 0 insertions, 31 deletions
diff --git a/server/src/Data/Database/ApiAccessToken.cs b/server/src/Data/Database/ApiAccessToken.cs
deleted file mode 100644
index 9582869..0000000
--- a/server/src/Data/Database/ApiAccessToken.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-namespace IOL.GreatOffice.Api.Data.Database;
-
-public class ApiAccessToken : Base
-{
- public User User { get; set; }
- public DateTime ExpiryDate { get; set; }
- public bool AllowRead { get; set; }
- public bool AllowCreate { get; set; }
- public bool AllowUpdate { get; set; }
- public bool AllowDelete { get; set; }
- public bool HasExpired => ExpiryDate < AppDateTime.UtcNow;
- public ApiAccessTokenDto AsDto => new(this);
-
- public class ApiAccessTokenDto
- {
- public ApiAccessTokenDto(ApiAccessToken source) {
- ExpiryDate = source.ExpiryDate;
- AllowRead = source.AllowRead;
- AllowCreate = source.AllowCreate;
- AllowUpdate = source.AllowUpdate;
- AllowDelete = source.AllowDelete;
- }
-
- public DateTime ExpiryDate { get; set; }
- public bool AllowRead { get; set; }
- public bool AllowCreate { get; set; }
- public bool AllowUpdate { get; set; }
- public bool AllowDelete { get; set; }
- public bool HasExpired => ExpiryDate < AppDateTime.UtcNow;
- }
-} \ No newline at end of file