summaryrefslogtreecommitdiff
path: root/Api/Models
diff options
context:
space:
mode:
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; }
+}