diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2024-10-30 20:59:53 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2024-10-30 20:59:53 +0000 |
commit | dc1938dbb98dc9edf16558e505b2961246c83e6e (patch) | |
tree | 7953186976085ceca6c03a208d1ffd9596f745be /Api/Models | |
parent | fc3c7e3b3c955cc274d4668768466fecb8fb727b (diff) | |
download | wikiwaka-dc1938dbb98dc9edf16558e505b2961246c83e6e.tar wikiwaka-dc1938dbb98dc9edf16558e505b2961246c83e6e.tar.gz wikiwaka-dc1938dbb98dc9edf16558e505b2961246c83e6e.tar.bz2 wikiwaka-dc1938dbb98dc9edf16558e505b2961246c83e6e.tar.lz wikiwaka-dc1938dbb98dc9edf16558e505b2961246c83e6e.tar.xz wikiwaka-dc1938dbb98dc9edf16558e505b2961246c83e6e.tar.zst wikiwaka-dc1938dbb98dc9edf16558e505b2961246c83e6e.zip |
Diffstat (limited to 'Api/Models')
-rw-r--r-- | Api/Models/Content.cs | 7 | ||||
-rw-r--r-- | Api/Models/DbWikiWakaContext.cs | 11 | ||||
-rw-r--r-- | Api/Models/Language.cs | 7 | ||||
-rw-r--r-- | Api/Models/Property.cs | 11 | ||||
-rw-r--r-- | Api/Models/Version.cs | 6 |
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; } +} |