SES-68 Added Basic ViewModels #7

Merged
s426134 merged 2 commits from SES-68 into master 2020-12-03 22:21:45 +01:00
13 changed files with 248 additions and 81 deletions
Showing only changes of commit f123ef65eb - Show all commits

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -5,7 +5,9 @@ VisualStudioVersion = 16.0.30717.126
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SessionCompanion", "SessionCompanion\SessionCompanion.csproj", "{C646135F-16CE-4B16-B041-252D343D4E01}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SessionCompanion", "SessionCompanion\SessionCompanion.csproj", "{C646135F-16CE-4B16-B041-252D343D4E01}"
EndProject 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 EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution 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}.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.ActiveCfg = Release|Any CPU
{CA05189B-A4AB-4946-80DC-EFA075A10F09}.Release|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE