summaryrefslogtreecommitdiffstats
path: root/api/WhatApi/Tables
diff options
context:
space:
mode:
Diffstat (limited to 'api/WhatApi/Tables')
-rw-r--r--api/WhatApi/Tables/Content.cs12
-rw-r--r--api/WhatApi/Tables/Place.cs11
-rw-r--r--api/WhatApi/Tables/Session.cs10
-rw-r--r--api/WhatApi/Tables/User.cs12
4 files changed, 45 insertions, 0 deletions
diff --git a/api/WhatApi/Tables/Content.cs b/api/WhatApi/Tables/Content.cs
new file mode 100644
index 0000000..79f2579
--- /dev/null
+++ b/api/WhatApi/Tables/Content.cs
@@ -0,0 +1,12 @@
+using System.Net;
+
+namespace WhatApi.Tables;
+
+public class Content
+{
+ public Guid Id { get; set; }
+ public string Mime { get; set; }
+ public DateTime Created { get; set; }
+ public Guid BlobId { get; set; }
+ public IPAddress Ip { get; set; }
+} \ No newline at end of file
diff --git a/api/WhatApi/Tables/Place.cs b/api/WhatApi/Tables/Place.cs
new file mode 100644
index 0000000..ff95c96
--- /dev/null
+++ b/api/WhatApi/Tables/Place.cs
@@ -0,0 +1,11 @@
+using NetTopologySuite.Geometries;
+
+namespace WhatApi.Tables;
+
+public class Place
+{
+ public Guid Id { get; set; }
+ public Guid ContentId { get; set; }
+ public Content Content { get; set; }
+ public required Point Location { get; set; }
+} \ No newline at end of file
diff --git a/api/WhatApi/Tables/Session.cs b/api/WhatApi/Tables/Session.cs
new file mode 100644
index 0000000..a0affa8
--- /dev/null
+++ b/api/WhatApi/Tables/Session.cs
@@ -0,0 +1,10 @@
+namespace WhatApi.Tables;
+
+public class Session
+{
+ public Guid Id { get; set; }
+ public string Token { get; set; }
+ public DateTime Created { get; set; }
+ public DateTime? Expires { get; set; }
+ public User User { get; set; }
+} \ No newline at end of file
diff --git a/api/WhatApi/Tables/User.cs b/api/WhatApi/Tables/User.cs
new file mode 100644
index 0000000..0ebe9b6
--- /dev/null
+++ b/api/WhatApi/Tables/User.cs
@@ -0,0 +1,12 @@
+namespace WhatApi.Tables;
+
+public class User
+{
+ public Guid Id { get; set; }
+ public string Name { get; set; }
+ public string Email { get; set; }
+ public string Password { get; set; }
+ public DateTime Created { get; set; }
+ public DateTime? LastSeen { get; set; }
+ public IEnumerable<Place> Places { get; set; }
+} \ No newline at end of file