summaryrefslogtreecommitdiff
path: root/Api/Models
diff options
context:
space:
mode:
authorLuca Matei Pintilie <luca@lucamatei.com>2024-10-30 20:59:53 +0000
committerLuca Matei Pintilie <luca@lucamatei.com>2024-10-30 20:59:53 +0000
commitdc1938dbb98dc9edf16558e505b2961246c83e6e (patch)
tree7953186976085ceca6c03a208d1ffd9596f745be /Api/Models
parentfc3c7e3b3c955cc274d4668768466fecb8fb727b (diff)
downloadwikiwaka-master.tar
wikiwaka-master.tar.gz
wikiwaka-master.tar.bz2
wikiwaka-master.tar.lz
wikiwaka-master.tar.xz
wikiwaka-master.tar.zst
wikiwaka-master.zip
Add API and TestHEADmaster
Diffstat (limited to 'Api/Models')
-rw-r--r--Api/Models/Content.cs7
-rw-r--r--Api/Models/DbWikiWakaContext.cs11
-rw-r--r--Api/Models/Language.cs7
-rw-r--r--Api/Models/Property.cs11
-rw-r--r--Api/Models/Version.cs6
5 files changed, 42 insertions, 0 deletions
diff --git a/Api/Models/Content.cs b/Api/Models/Content.cs
new file mode 100644
index 0000000..d59c8e1
--- /dev/null
+++ b/Api/Models/Content.cs
@@ -0,0 +1,7 @@
+namespace WikiWaka.Api.Models;
+
+public class Content
+{
+ public int Id { get; set; }
+ public ICollection<Property> Properties { get; set; }
+}
diff --git a/Api/Models/DbWikiWakaContext.cs b/Api/Models/DbWikiWakaContext.cs
new file mode 100644
index 0000000..cf5632a
--- /dev/null
+++ b/Api/Models/DbWikiWakaContext.cs
@@ -0,0 +1,11 @@
+using Microsoft.EntityFrameworkCore;
+
+namespace WikiWaka.Api.Models;
+
+public class DbWikiWakaContext(DbContextOptions options) : DbContext(options)
+{
+ public DbSet<Content> Content { get; set; }
+ public DbSet<Version> Version { get; set; }
+ public DbSet<Property> Property { get; set; }
+ public DbSet<Language> Language { get; set; }
+}
diff --git a/Api/Models/Language.cs b/Api/Models/Language.cs
new file mode 100644
index 0000000..a8fd30e
--- /dev/null
+++ b/Api/Models/Language.cs
@@ -0,0 +1,7 @@
+namespace WikiWaka.Api.Models;
+
+public class Language
+{
+ public int Id { get; set; }
+ public required string LanguageCode { get; set; }
+}
diff --git a/Api/Models/Property.cs b/Api/Models/Property.cs
new file mode 100644
index 0000000..b20adac
--- /dev/null
+++ b/Api/Models/Property.cs
@@ -0,0 +1,11 @@
+namespace WikiWaka.Api.Models;
+
+public class Property
+{
+ public int Id { get; set; }
+ public required string Text { get; set; }
+
+ public required Content Content { get; set; }
+ public required Language Language { get; set; }
+ public required Version Version { get; set; }
+}
diff --git a/Api/Models/Version.cs b/Api/Models/Version.cs
new file mode 100644
index 0000000..e4971e9
--- /dev/null
+++ b/Api/Models/Version.cs
@@ -0,0 +1,6 @@
+namespace WikiWaka.Api.Models;
+
+public class Version
+{
+ public int Id { get; set; }
+}