From f31b41f942b7b873c99d0ce44aa810a364bc0e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20G=C3=B3rzy=C5=84ski?= Date: Tue, 12 Jan 2021 20:47:09 +0100 Subject: [PATCH 1/2] SES-143 Add Monster releated tables --- .../Tables/GameAction.cs | 30 ++++ .../Tables/LegendaryAction.cs | 23 +++ .../Tables/Monster.cs | 162 ++++++++++++++++++ .../Tables/MonsterAction.cs | 24 +++ .../Tables/MonsterLegendaryAction.cs | 24 +++ .../Tables/MonsterSpecialAbility.cs | 28 +++ .../Tables/SpecialAbility.cs | 27 +++ 7 files changed, 318 insertions(+) create mode 100644 SessionCompanion/SessionCompanion.Database/Tables/GameAction.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Tables/LegendaryAction.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Tables/Monster.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Tables/MonsterAction.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Tables/MonsterLegendaryAction.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Tables/MonsterSpecialAbility.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Tables/SpecialAbility.cs diff --git a/SessionCompanion/SessionCompanion.Database/Tables/GameAction.cs b/SessionCompanion/SessionCompanion.Database/Tables/GameAction.cs new file mode 100644 index 0000000..a523153 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/GameAction.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class GameAction : BaseEntity + { + // + /// Nazwa akcji + /// + public string Name { get; set; } + + /// + /// Opis akcji + /// + public string Description { get; set; } + + public int AttackBonus { get; set; } + + public int? DamageDice { get; set; } + public int? DamageDiceAmount { get; set; } + + public int? DamageBonus { get; set; } + + public virtual ICollection MonsterActions { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/LegendaryAction.cs b/SessionCompanion/SessionCompanion.Database/Tables/LegendaryAction.cs new file mode 100644 index 0000000..32c16a0 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/LegendaryAction.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class LegendaryAction : BaseEntity + { + // + /// Nazwa legendarnej akcji + /// + public string Name { get; set; } + + /// + /// Opis akcji + /// + public string Description { get; set; } + + public virtual ICollection MonsterLegendaryActions { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Monster.cs b/SessionCompanion/SessionCompanion.Database/Tables/Monster.cs new file mode 100644 index 0000000..6c641ab --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Monster.cs @@ -0,0 +1,162 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class Monster : BaseEntity + { + /// + /// Nazwa potwora + /// + public string Name { get; set; } + + /// + /// Rozmiar potwora + /// + public string Size { get; set; } + + /// + /// Rodzaj potwora + /// + public string Type { get; set; } + + /// + /// Podtyp potwora + /// + public string Subtype { get; set; } + + /// + /// Charakter potwora + /// + public string Alignment { get; set; } + + /// + /// Poziom pancerza potwora + /// + public int ArmorClass { get; set; } + + /// + /// Iloś punktów zycia potwora + /// + public int HitPoints { get; set; } + + /// + /// Ilość kości określajacych punkty życia potwora + /// + public int HitDiceAmount { get; set; } + + /// + /// Kość którą rzucamy aby określić punkty życia potwora + /// + public int HitDiceType { get; set; } + + /// + /// Szybkość chodzenia potwora + /// + public string WalkSpeed { get; set; } + + /// + /// Szybkość pływania potwora + /// + public string SwimSpeed { get; set; } + + /// + /// Szybkość latania potwora + /// + public string FlySpeed { get; set; } + + /// + /// Punkty zręczności potwora + /// + public int Dexterity { get; set; } + public int? DexteritySave { get; set; } + + /// + /// Punkty siły potwora + /// + public int Strength { get; set; } + public int? StrengthSave { get; set; } + + /// + /// Punkty kondycji potwora + /// + public int Constitution { get; set; } + public int? ConstitutionSave { get; set; } + + /// + /// Punkty inteligencji potwora + /// + public int Intelligence { get; set; } + public int? IntelligenceSave { get; set; } + + /// + /// Punkty mądrości potwora + /// + public int Wisdom { get; set; } + public int? WisdomSave { get; set; } + + /// + /// Punkty charyzmy potwora + /// + public int Charisma { get; set; } + public int? CharismaSave { get; set; } + + /// + /// Poziom trudności potwora + /// + public int ChallengeRating { get; set; } + + /// + /// Punkty doświadczenia za zabicie potwora + /// + public int ExperiencePoints { get; set; } + + /// + /// Połączenie z tabelą MonsterActions + /// + public virtual ICollection MonsterAction { get; set; } + + /// + /// Na jakie stany odporny jest potwor + /// + public string MonsterConditionImmunities { get; set; } + + /// + /// Na jakie obrazenia odporny jest potwor + /// + public string MonsterDamageImmunities { get; set; } + + /// + /// Na jakie obrazenia potwor ma zmniejszoną słabosc + /// + public string MonsterDamageResistances { get; set; } + + /// + /// Na co potwor jest wrazliwy + /// + public string MonsterDamageVulnerabilities { get; set; } + + /// + /// Jezyki jakimi wlada potwor + /// + public string MonsterLanguages { get; set; } + + /// + /// Połączenie z tabelą MonsterLegendaryActions + /// + public virtual ICollection MonsterLegendaryAction { get; set; } + + /// + /// Połączenie z tabelą MonsterSenses + /// + public string MonsterSenses { get; set; } + + /// + /// Połączenie z tabelą MonsterSpecialAbilities + /// + public virtual ICollection MonsterSpecialAbility { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/MonsterAction.cs b/SessionCompanion/SessionCompanion.Database/Tables/MonsterAction.cs new file mode 100644 index 0000000..d3b9b88 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/MonsterAction.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class MonsterAction : BaseEntity + { + /// + /// Id potwora + /// + public int MonsterId { get; set; } + + /// + /// Połączenie z tabelą Monsters + /// + public virtual Monster Monster { get; set; } + + public int GameActionId { get; set; } + public virtual GameAction GameAction { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/MonsterLegendaryAction.cs b/SessionCompanion/SessionCompanion.Database/Tables/MonsterLegendaryAction.cs new file mode 100644 index 0000000..7d8c47e --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/MonsterLegendaryAction.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class MonsterLegendaryAction : BaseEntity + { + /// + /// Id potwora + /// + public int MonsterId { get; set; } + public int LegendaryActionId { get; set; } + + /// + /// Połączenie z tabelą Monster + /// + public virtual Monster Monster { get; set; } + + public virtual LegendaryAction LegendaryActions { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/MonsterSpecialAbility.cs b/SessionCompanion/SessionCompanion.Database/Tables/MonsterSpecialAbility.cs new file mode 100644 index 0000000..d2e1492 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/MonsterSpecialAbility.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class MonsterSpecialAbility : BaseEntity + { + public int SpecialAbilityId { get; set; } + + + public int? DamageDice { get; set; } + + public int? DamageDiceAmount { get; set; } + /// + /// Id potwora + /// + public int? MonsterId { get; set; } + + public virtual SpecialAbility SpecialAbility { get; set; } + /// + /// Połączenie z tabelą Monster + /// + public virtual Monster Monster { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/SpecialAbility.cs b/SessionCompanion/SessionCompanion.Database/Tables/SpecialAbility.cs new file mode 100644 index 0000000..edb0380 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/SpecialAbility.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class SpecialAbility : BaseEntity + { + // + /// Nazwa umiejętności + /// + public string Name { get; set; } + + /// + /// Opis umiejętności + /// + public string Description { get; set; } + + public int? DamageDice { get; set; } + + public int? DamageDiceAmount { get; set; } + + public virtual ICollection MonsterSpecialAbilities { get; set; } + } +} -- 2.20.1 From fad8b27797e4aad30fc1799ac3119aada8e1b935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20G=C3=B3rzy=C5=84ski?= Date: Tue, 12 Jan 2021 20:47:33 +0100 Subject: [PATCH 2/2] SES-143 Add monster related reposittories and ViewModel --- .../ApplicationDbContext.cs | 1 + .../Repositories/GameActionRepository.cs | 14 ++ .../Repositories/LegendaryActionRepository.cs | 14 ++ .../Repositories/MonsterActionsRepository.cs | 14 ++ .../MonsterLegendaryActionsRepository.cs | 14 ++ .../Repositories/MonsterRepository.cs | 14 ++ .../MonsterSpecialAbilitiesRepository.cs | 14 ++ .../Repositories/SpecialAbilityRepository.cs | 14 ++ .../GameActionViewModel.cs | 24 +++ .../LegendaryActionViewModel.cs | 20 +++ .../MonsterActionsViewModel.cs | 17 ++ .../MonsterLegendaryActionsViewModel.cs | 13 ++ .../MonsterSpecialAbilitiesViewModel.cs | 13 ++ .../MonsterAllInformationViewModel.cs | 156 ++++++++++++++++++ .../MonsterViewModels/MonsterViewModel.cs | 146 ++++++++++++++++ .../SpecialAbilityViewModel.cs | 24 +++ .../Configurations/RepositoryConfiguration.cs | 7 + 17 files changed, 519 insertions(+) create mode 100644 SessionCompanion/SessionCompanion.Database/Repositories/GameActionRepository.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Repositories/LegendaryActionRepository.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Repositories/MonsterActionsRepository.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Repositories/MonsterLegendaryActionsRepository.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Repositories/MonsterRepository.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Repositories/MonsterSpecialAbilitiesRepository.cs create mode 100644 SessionCompanion/SessionCompanion.Database/Repositories/SpecialAbilityRepository.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/GameActionViewModels/GameActionViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/LegendaryActionViewModels/LegendaryActionViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/MonsterActionsViewModels/MonsterActionsViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/MonsterLegendaryActionsViewModels/MonsterLegendaryActionsViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/MonsterSpecialAbilitiesViewModels/MonsterSpecialAbilitiesViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterAllInformationViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterViewModel.cs create mode 100644 SessionCompanion/SessionCompanion.ViewModels/SpecialAbilityViewModels/SpecialAbilityViewModel.cs diff --git a/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs b/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs index 9b78d69..c5359f5 100644 --- a/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs +++ b/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs @@ -127,3 +127,4 @@ namespace SessionCompanion.Database } } } + diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/GameActionRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/GameActionRepository.cs new file mode 100644 index 0000000..4c08429 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/GameActionRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class GameActionRepository : Repository, IRepository + { + public GameActionRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/LegendaryActionRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/LegendaryActionRepository.cs new file mode 100644 index 0000000..6cd9a0c --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/LegendaryActionRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class LegendaryActionRepository : Repository, IRepository + { + public LegendaryActionRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/MonsterActionsRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterActionsRepository.cs new file mode 100644 index 0000000..73817a4 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterActionsRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class MonsterActionsRepository : Repository, IRepository + { + public MonsterActionsRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/MonsterLegendaryActionsRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterLegendaryActionsRepository.cs new file mode 100644 index 0000000..b68cd81 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterLegendaryActionsRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class MonsterLegendaryActionsRepository : Repository, IRepository + { + public MonsterLegendaryActionsRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/MonsterRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterRepository.cs new file mode 100644 index 0000000..d79da11 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class MonsterRepository : Repository, IRepository + { + public MonsterRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/MonsterSpecialAbilitiesRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterSpecialAbilitiesRepository.cs new file mode 100644 index 0000000..ea2f25b --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/MonsterSpecialAbilitiesRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class MonsterSpecialAbilitiesRepository : Repository, IRepository + { + public MonsterSpecialAbilitiesRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Repositories/SpecialAbilityRepository.cs b/SessionCompanion/SessionCompanion.Database/Repositories/SpecialAbilityRepository.cs new file mode 100644 index 0000000..77c2764 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Repositories/SpecialAbilityRepository.cs @@ -0,0 +1,14 @@ +using SessionCompanion.Database.Repositories.Base; +using SessionCompanion.Database.Tables; +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.Database.Repositories +{ + public class SpecialAbilityRepository : Repository, IRepository + { + public SpecialAbilityRepository(ApplicationDbContext _dbContext) : base(_dbContext) + { } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/GameActionViewModels/GameActionViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/GameActionViewModels/GameActionViewModel.cs new file mode 100644 index 0000000..ea919c9 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/GameActionViewModels/GameActionViewModel.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.GameActionViewModels +{ + public class GameActionViewModel + { + public int Id { get; set; } + public string Name { get; set; } + + /// + /// Opis akcji + /// + public string Description { get; set; } + + public int AttackBonus { get; set; } + + public int? DamageDice { get; set; } + public int? DamageDiceAmount { get; set; } + + public int? DamageBonus { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/LegendaryActionViewModels/LegendaryActionViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/LegendaryActionViewModels/LegendaryActionViewModel.cs new file mode 100644 index 0000000..0e5b6f2 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/LegendaryActionViewModels/LegendaryActionViewModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.LegendaryActionViewModels +{ + public class LegendaryActionViewModel + { + public int Id { get; set; } + // + /// Nazwa legendarnej akcji + /// + public string Name { get; set; } + + /// + /// Opis akcji + /// + public string Description { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/MonsterActionsViewModels/MonsterActionsViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/MonsterActionsViewModels/MonsterActionsViewModel.cs new file mode 100644 index 0000000..84dda2d --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/MonsterActionsViewModels/MonsterActionsViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.MonsterActionsViewModels +{ + public class MonsterActionsViewModel + { + public int Id { get; set; } + /// + /// Id potwora + /// + public int MonsterId { get; set; } + + public int GameActionId { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/MonsterLegendaryActionsViewModels/MonsterLegendaryActionsViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/MonsterLegendaryActionsViewModels/MonsterLegendaryActionsViewModel.cs new file mode 100644 index 0000000..b5f546d --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/MonsterLegendaryActionsViewModels/MonsterLegendaryActionsViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.MonsterLegendaryActionsViewModels +{ + public class MonsterLegendaryActionsViewModel + { + public int Id { get; set; } + public int MonsterId { get; set; } + public int LegendaryActionId { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/MonsterSpecialAbilitiesViewModels/MonsterSpecialAbilitiesViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/MonsterSpecialAbilitiesViewModels/MonsterSpecialAbilitiesViewModel.cs new file mode 100644 index 0000000..de1eb2f --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/MonsterSpecialAbilitiesViewModels/MonsterSpecialAbilitiesViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.MonsterSpecialAbilitiesViewModels +{ + public class MonsterSpecialAbilitiesViewModel + { + public int Id { get; set; } + public int MonsterId { get; set; } + public int LegendaryActionId { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterAllInformationViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterAllInformationViewModel.cs new file mode 100644 index 0000000..270c9d4 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterAllInformationViewModel.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.MonsterViewModels +{ + using SessionCompanion.ViewModels.GameActionViewModels; + using SessionCompanion.ViewModels.LegendaryActionViewModels; + using SessionCompanion.ViewModels.SpecialAbilityViewModels; + + public class MonsterAllInformationViewModel + { + public int Id { get; set; } + /// + /// Nazwa potwora + /// + public string Name { get; set; } + + /// + /// Rozmiar potwora + /// + public string Size { get; set; } + + /// + /// Rodzaj potwora + /// + public string Type { get; set; } + + /// + /// Podtyp potwora + /// + public string Subtype { get; set; } + + /// + /// Charakter potwora + /// + public string Alignment { get; set; } + + /// + /// Poziom pancerza potwora + /// + public int ArmorClass { get; set; } + + /// + /// Iloś punktów zycia potwora + /// + public int HitPoints { get; set; } + + /// + /// Ilość kości określajacych punkty życia potwora + /// + public int HitDiceAmount { get; set; } + + /// + /// Kość którą rzucamy aby określić punkty życia potwora + /// + public int HitDiceType { get; set; } + + /// + /// Szybkość chodzenia potwora + /// + public string WalkSpeed { get; set; } + + /// + /// Szybkość pływania potwora + /// + public string SwimSpeed { get; set; } + + /// + /// Szybkość latania potwora + /// + public string FlySpeed { get; set; } + + /// + /// Punkty zręczności potwora + /// + public int Dexterity { get; set; } + public int? DexteritySave { get; set; } + + /// + /// Punkty siły potwora + /// + public int Strength { get; set; } + public int? StrengthSave { get; set; } + + /// + /// Punkty kondycji potwora + /// + public int Constitution { get; set; } + public int? ConstitutionSave { get; set; } + + /// + /// Punkty inteligencji potwora + /// + public int Intelligence { get; set; } + public int? IntelligenceSave { get; set; } + + /// + /// Punkty mądrości potwora + /// + public int Wisdom { get; set; } + public int? WisdomSave { get; set; } + + /// + /// Punkty charyzmy potwora + /// + public int Charisma { get; set; } + public int? CharismaSave { get; set; } + + /// + /// Poziom trudności potwora + /// + public int ChallengeRating { get; set; } + + /// + /// Punkty doświadczenia za zabicie potwora + /// + public int ExperiencePoints { get; set; } + + /// + /// Na jakie stany odporny jest potwor + /// + public string MonsterConditionImmunities { get; set; } + + /// + /// Na jakie obrazenia odporny jest potwor + /// + public string MonsterDamageImmunities { get; set; } + + /// + /// Na jakie obrazenia potwor ma zmniejszoną słabosc + /// + public string MonsterDamageResistances { get; set; } + + /// + /// Na co potwor jest wrazliwy + /// + public string MonsterDamageVulnerabilities { get; set; } + + /// + /// Jezyki jakimi wlada potwor + /// + public string MonsterLanguages { get; set; } + + /// + /// Połączenie z tabelą MonsterSenses + /// + public string MonsterSenses { get; set; } + + public ICollection MonsterGameActions { get; set; } + + public ICollection MonsteLegendaryActions { get; set; } + + public ICollection MonsterSpecialAbilities { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterViewModel.cs new file mode 100644 index 0000000..00c89f0 --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/MonsterViewModels/MonsterViewModel.cs @@ -0,0 +1,146 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.MonsterViewModels +{ + public class MonsterViewModel + { + public int Id { get; set; } + /// + /// Nazwa potwora + /// + public string Name { get; set; } + + /// + /// Rozmiar potwora + /// + public string Size { get; set; } + + /// + /// Rodzaj potwora + /// + public string Type { get; set; } + + /// + /// Podtyp potwora + /// + public string Subtype { get; set; } + + /// + /// Charakter potwora + /// + public string Alignment { get; set; } + + /// + /// Poziom pancerza potwora + /// + public int ArmorClass { get; set; } + + /// + /// Iloś punktów zycia potwora + /// + public int HitPoints { get; set; } + + /// + /// Ilość kości określajacych punkty życia potwora + /// + public int HitDiceAmount { get; set; } + + /// + /// Kość którą rzucamy aby określić punkty życia potwora + /// + public int HitDiceType { get; set; } + + /// + /// Szybkość chodzenia potwora + /// + public string WalkSpeed { get; set; } + + /// + /// Szybkość pływania potwora + /// + public string SwimSpeed { get; set; } + + /// + /// Szybkość latania potwora + /// + public string FlySpeed { get; set; } + + /// + /// Punkty zręczności potwora + /// + public int Dexterity { get; set; } + public int? DexteritySave { get; set; } + + /// + /// Punkty siły potwora + /// + public int Strength { get; set; } + public int? StrengthSave { get; set; } + + /// + /// Punkty kondycji potwora + /// + public int Constitution { get; set; } + public int? ConstitutionSave { get; set; } + + /// + /// Punkty inteligencji potwora + /// + public int Intelligence { get; set; } + public int? IntelligenceSave { get; set; } + + /// + /// Punkty mądrości potwora + /// + public int Wisdom { get; set; } + public int? WisdomSave { get; set; } + + /// + /// Punkty charyzmy potwora + /// + public int Charisma { get; set; } + public int? CharismaSave { get; set; } + + /// + /// Poziom trudności potwora + /// + public int ChallengeRating { get; set; } + + /// + /// Punkty doświadczenia za zabicie potwora + /// + public int ExperiencePoints { get; set; } + + /// + /// Na jakie stany odporny jest potwor + /// + public string MonsterConditionImmunities { get; set; } + + /// + /// Na jakie obrazenia odporny jest potwor + /// + public string MonsterDamageImmunities { get; set; } + + /// + /// Na jakie obrazenia potwor ma zmniejszoną słabosc + /// + public string MonsterDamageResistances { get; set; } + + /// + /// Na co potwor jest wrazliwy + /// + public string MonsterDamageVulnerabilities { get; set; } + + /// + /// Jezyki jakimi wlada potwor + /// + public string MonsterLanguages { get; set; } + + /// + /// Połączenie z tabelą MonsterSenses + /// + public string MonsterSenses { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.ViewModels/SpecialAbilityViewModels/SpecialAbilityViewModel.cs b/SessionCompanion/SessionCompanion.ViewModels/SpecialAbilityViewModels/SpecialAbilityViewModel.cs new file mode 100644 index 0000000..570140d --- /dev/null +++ b/SessionCompanion/SessionCompanion.ViewModels/SpecialAbilityViewModels/SpecialAbilityViewModel.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace SessionCompanion.ViewModels.SpecialAbilityViewModels +{ + public class SpecialAbilityViewModel + { + public int Id { get; set; } + // + /// Nazwa umiejętności + /// + public string Name { get; set; } + + /// + /// Opis umiejętności + /// + public string Description { get; set; } + + public int? DamageDice { get; set; } + + public int? DamageDiceAmount { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs b/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs index 1e9659d..3ae65db 100644 --- a/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs +++ b/SessionCompanion/SessionCompanion/Configurations/RepositoryConfiguration.cs @@ -36,6 +36,13 @@ namespace SessionCompanion.Configurations services.AddScoped, CharacterOtherEquipmentRepository>(); services.AddScoped, WeaponRepository>(); services.AddScoped, CharacterWeaponRepository>(); + services.AddScoped, GameActionRepository>(); + services.AddScoped, LegendaryActionRepository>(); + services.AddScoped, MonsterActionsRepository>(); + services.AddScoped, MonsterLegendaryActionsRepository>(); + services.AddScoped, MonsterRepository>(); + services.AddScoped, MonsterSpecialAbilitiesRepository>(); + services.AddScoped, SpecialAbilityRepository>(); return services; } } -- 2.20.1