aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Entities/RegisterCode.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-16 23:15:51 +0800
committercrupest <crupest@outlook.com>2022-04-16 23:15:51 +0800
commite7a441b8805f8b02ba37ab1f550fa2939fe9e7f0 (patch)
treed447644adbd41b3d4e0adc8800b00a7b88ad4ab7 /BackEnd/Timeline/Entities/RegisterCode.cs
parenteb1b148146281449b56bd68d1f99b4e48287a0b7 (diff)
downloadtimeline-e7a441b8805f8b02ba37ab1f550fa2939fe9e7f0.tar.gz
timeline-e7a441b8805f8b02ba37ab1f550fa2939fe9e7f0.tar.bz2
timeline-e7a441b8805f8b02ba37ab1f550fa2939fe9e7f0.zip
...
Diffstat (limited to 'BackEnd/Timeline/Entities/RegisterCode.cs')
-rw-r--r--BackEnd/Timeline/Entities/RegisterCode.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Entities/RegisterCode.cs b/BackEnd/Timeline/Entities/RegisterCode.cs
new file mode 100644
index 00000000..945d61e9
--- /dev/null
+++ b/BackEnd/Timeline/Entities/RegisterCode.cs
@@ -0,0 +1,24 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Timeline.Entities
+{
+ [Table("register_code")]
+ public class RegisterCode
+ {
+ [Key, Column("id"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public long Id { get; set; }
+
+ [Column("owner_id")]
+ public long OwnerId { get; set; }
+
+ [ForeignKey(nameof(OwnerId))]
+ public UserEntity Owner { get; set; } = default!;
+
+ [Column("code")]
+ public string Code { get; set; } = default!;
+
+ [Column("enabled")]
+ public bool Enabled { get; set; }
+ }
+}