aboutsummaryrefslogtreecommitdiff
path: root/back-end/src/Model/WebExtensionAuth.cs
diff options
context:
space:
mode:
Diffstat (limited to 'back-end/src/Model/WebExtensionAuth.cs')
-rw-r--r--back-end/src/Model/WebExtensionAuth.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/back-end/src/Model/WebExtensionAuth.cs b/back-end/src/Model/WebExtensionAuth.cs
new file mode 100644
index 0000000..7be6a60
--- /dev/null
+++ b/back-end/src/Model/WebExtensionAuth.cs
@@ -0,0 +1,50 @@
+// Copyright (C) 2024 Vaughn Nugent
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.Text.Json.Serialization;
+
+using VNLib.Plugins.Extensions.Data;
+using VNLib.Plugins.Extensions.Data.Abstractions;
+
+
+namespace SimpleBookmark.Model
+{
+ internal sealed class WebExtensionAuth : DbModelBase, IUserEntity
+ {
+ [Key]
+ [MaxLength(64)]
+ public override string Id { get; set; }
+
+ public override DateTime Created { get; set; }
+
+ public override DateTime LastModified { get; set; }
+
+ [JsonIgnore]
+ [MaxLength(64)]
+ public string? UserId { get; set; }
+
+ [MaxLength(200)]
+ public string? ExtensionId { get; set; }
+
+ [MaxLength(1000)]
+ public string? PublicKey { get; set; }
+
+ [JsonIgnore]
+ [MaxLength(2000)]
+ public byte[]? AdditionalData { get; set; }
+ }
+}