diff --git a/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj b/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj
index 6858ae5..e084383 100644
--- a/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj
+++ b/SessionCompanion/SessionCompanion.Database/SessionCompanion.Database.csproj
@@ -17,8 +17,4 @@
-
-
-
-
diff --git a/SessionCompanion/SessionCompanion.ViewModels/AlignmentViewModels/AlignmentViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/AlignmentViewModels/AlignmentViewModel.cs
new file mode 100644
index 0000000..34e71b6
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/AlignmentViewModels/AlignmentViewModel.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.AlignmentViewModels
+{
+ public class AlignmentViewModel
+ {
+ public int Id { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/BackgroundViewModels/BackgroundViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/BackgroundViewModels/BackgroundViewModel.cs
new file mode 100644
index 0000000..a82d167
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/BackgroundViewModels/BackgroundViewModel.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.BackgroundViewModels
+{
+ public class BackgroundViewModel
+ {
+ public int Id { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/BiographyViewModels/BiographyViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/BiographyViewModels/BiographyViewModel.cs
new file mode 100644
index 0000000..88bd830
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/BiographyViewModels/BiographyViewModel.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.BiographyViewModels
+{
+ public class BiographyViewModel
+ {
+ public int Id { get; set; }
+ public int CharacterId { get; set; }
+ public string Name { get; set; }
+ public int ClassId { get; set; }
+ public int AlignmentId { get; set; }
+ public int BackgroundId { get; set; }
+ public string Sex { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterBasicStatsViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterBasicStatsViewModel.cs
new file mode 100644
index 0000000..4a6eedf
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterBasicStatsViewModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.CharacterViewModels
+{
+ public class CharacterBasicStatsViewModel
+ {
+ public int Id { get; set; }
+ public string Name { get; set; }
+ public int Level { get; set; }
+ public int CurrentHealthPoints { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterForLoginViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterForLoginViewModel.cs
new file mode 100644
index 0000000..dbb288e
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterForLoginViewModel.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.CharacterViewModels
+{
+ public class CharacterForLoginViewModel
+ {
+ public int Id { get; set; }
+ public int UserId { get; set; }
+ public string Name { get; set; }
+ public string ClassName { get; set; }
+ public int Level { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterViewModel.cs
new file mode 100644
index 0000000..030d8bb
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/CharacterViewModels/CharacterViewModel.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.CharacterViewModels
+{
+ public class CharacterViewModel
+ {
+ public int Id { get; set; }
+ public int UserId { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/ClassViewModels/ClassViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/ClassViewModels/ClassViewModel.cs
new file mode 100644
index 0000000..0a36df8
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/ClassViewModels/ClassViewModel.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.ClassViewModels
+{
+ public class ClassViewModel
+ {
+ public int Id { get; set; }
+ public string Name { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/RaceViewModels/RaceViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/RaceViewModels/RaceViewModel.cs
new file mode 100644
index 0000000..da60376
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/RaceViewModels/RaceViewModel.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.RaceViewModels
+{
+ public class RaceViewModel
+ {
+ public int Id { get; set; }
+ public string Name { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.csproj b/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.csproj
new file mode 100644
index 0000000..01ca256
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/SessionCompanion.ViewModels.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netcoreapp3.1
+
+
+
diff --git a/SessionCompanion/SessionCompanion.ViewModels/StatisticsViewModels/StatisticsViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/StatisticsViewModels/StatisticsViewModel.cs
new file mode 100644
index 0000000..c2445c6
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/StatisticsViewModels/StatisticsViewModel.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.StatisticsViewModels
+{
+ public class StatisticsViewModel
+ {
+ public int Id { get; set; }
+ public int CharacterId { get; set; }
+ [Range(0, int.MaxValue)]
+ public int ExperiencePoints { get; set; }
+ [Range(0, int.MaxValue)]
+ public int Level { get; set; }
+ [Range(0, int.MaxValue)]
+ public int Speed { get; set; }
+ [Range(0, int.MaxValue)]
+ public int Initiative { get; set; }
+ [Range(0, int.MaxValue)]
+ public int HealthPoints { get; set; }
+ [Range(0, int.MaxValue)]
+ public int CurrentHealthPoints { get; set; }
+ [Range(0, int.MaxValue)]
+ public int ArmorClass { get; set; }
+ [Range(0, int.MaxValue)]
+ public int Proficiency { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.ViewModels/UserViewModels/UserViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/UserViewModels/UserViewModel.cs
new file mode 100644
index 0000000..66e3dcd
--- /dev/null
+++ b/SessionCompanion/SessionCompanion.ViewModels/UserViewModels/UserViewModel.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace SessionCompanion.ViewModels.UserViewModels
+{
+ public class UserViewModel
+ {
+ public int Id { get; set; }
+ public string Nickname { get; set; }
+ public string Password { get; set; }
+ }
+}
diff --git a/SessionCompanion/SessionCompanion.sln b/SessionCompanion/SessionCompanion.sln
index 0b42c62..f02778c 100644
--- a/SessionCompanion/SessionCompanion.sln
+++ b/SessionCompanion/SessionCompanion.sln
@@ -5,7 +5,9 @@ VisualStudioVersion = 16.0.30717.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SessionCompanion", "SessionCompanion\SessionCompanion.csproj", "{C646135F-16CE-4B16-B041-252D343D4E01}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SessionCompanion.Database", "SessionCompanion.Database\SessionCompanion.Database.csproj", "{CA05189B-A4AB-4946-80DC-EFA075A10F09}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SessionCompanion.Database", "SessionCompanion.Database\SessionCompanion.Database.csproj", "{CA05189B-A4AB-4946-80DC-EFA075A10F09}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SessionCompanion.ViewModels", "SessionCompanion.ViewModels\SessionCompanion.ViewModels.csproj", "{7762AA75-7B60-4F28-B80A-B03E39140F89}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -21,6 +23,10 @@ Global
{CA05189B-A4AB-4946-80DC-EFA075A10F09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA05189B-A4AB-4946-80DC-EFA075A10F09}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA05189B-A4AB-4946-80DC-EFA075A10F09}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7762AA75-7B60-4F28-B80A-B03E39140F89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7762AA75-7B60-4F28-B80A-B03E39140F89}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7762AA75-7B60-4F28-B80A-B03E39140F89}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7762AA75-7B60-4F28-B80A-B03E39140F89}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SessionCompanion/SessionCompanion/SessionCompanion.csproj b/SessionCompanion/SessionCompanion/SessionCompanion.csproj
index 07210e5..e9537a5 100644
--- a/SessionCompanion/SessionCompanion/SessionCompanion.csproj
+++ b/SessionCompanion/SessionCompanion/SessionCompanion.csproj
@@ -34,6 +34,7 @@
+
diff --git a/SessionCompanion/SessionCompanion/Startup.cs b/SessionCompanion/SessionCompanion/Startup.cs
index 74d6b69..4ff668f 100644
--- a/SessionCompanion/SessionCompanion/Startup.cs
+++ b/SessionCompanion/SessionCompanion/Startup.cs
@@ -1,86 +1,86 @@
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.HttpsPolicy;
-using Microsoft.AspNetCore.SpaServices.AngularCli;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.HttpsPolicy;
+using Microsoft.AspNetCore.SpaServices.AngularCli;
using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using SessionCompanion.Database;
-namespace SessionCompanion
-{
- public class Startup
- {
-
- public Startup(IConfiguration configuration)
- {
- Configuration = configuration;
- }
-
- public IConfiguration Configuration { get; }
-
- // This method gets called by the runtime. Use this method to add services to the container.
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddControllersWithViews();
- services.AddDbContext(options =>
- options.UseSqlServer(
- Configuration.GetConnectionString("DefaultConnection")));
- // In production, the Angular files will be served from this directory
- services.AddSpaStaticFiles(configuration =>
- {
- configuration.RootPath = "ClientApp/dist";
- });
-
- }
-
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
- {
+namespace SessionCompanion
+{
+ public class Startup
+ {
+
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddControllersWithViews();
+ services.AddDbContext(options =>
+ options.UseSqlServer(
+ Configuration.GetConnectionString("DefaultConnection")));
+ // In production, the Angular files will be served from this directory
+ services.AddSpaStaticFiles(configuration =>
+ {
+ configuration.RootPath = "ClientApp/dist";
+ });
+
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
using (var serviceScope = app.ApplicationServices.GetRequiredService().CreateScope())
{
serviceScope.ServiceProvider.GetService().Database.Migrate();
- }
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
- else
- {
- app.UseExceptionHandler("/Error");
- // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
- app.UseHsts();
- }
-
- app.UseHttpsRedirection();
- app.UseStaticFiles();
- if (!env.IsDevelopment())
- {
- app.UseSpaStaticFiles();
- }
-
- app.UseRouting();
-
- app.UseEndpoints(endpoints =>
- {
- endpoints.MapControllerRoute(
- name: "default",
- pattern: "{controller}/{action=Index}/{id?}");
- });
-
- app.UseSpa(spa =>
- {
- // To learn more about options for serving an Angular SPA from ASP.NET Core,
- // see https://go.microsoft.com/fwlink/?linkid=864501
-
- spa.Options.SourcePath = "ClientApp";
-
- if (env.IsDevelopment())
- {
- spa.UseAngularCliServer(npmScript: "start");
- }
- });
- }
- }
-}
+ }
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+ else
+ {
+ app.UseExceptionHandler("/Error");
+ // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
+ app.UseHsts();
+ }
+
+ app.UseHttpsRedirection();
+ app.UseStaticFiles();
+ if (!env.IsDevelopment())
+ {
+ app.UseSpaStaticFiles();
+ }
+
+ app.UseRouting();
+
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapControllerRoute(
+ name: "default",
+ pattern: "{controller}/{action=Index}/{id?}");
+ });
+
+ app.UseSpa(spa =>
+ {
+ // To learn more about options for serving an Angular SPA from ASP.NET Core,
+ // see https://go.microsoft.com/fwlink/?linkid=864501
+
+ spa.Options.SourcePath = "ClientApp";
+
+ if (env.IsDevelopment())
+ {
+ spa.UseAngularCliServer(npmScript: "start");
+ }
+ });
+ }
+ }
+}