diff --git a/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs b/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs index a081725..a02a092 100644 --- a/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs +++ b/SessionCompanion/SessionCompanion.Database/ApplicationDbContext.cs @@ -14,10 +14,16 @@ namespace SessionCompanion.Database public virtual DbSet Backgrounds { get; set; } public virtual DbSet Biographies { get; set; } public virtual DbSet Characters { get; set; } + public virtual DbSet Charismas { get; set; } public virtual DbSet Classes { get; set; } + public virtual DbSet Constitutions { get; set; } + public virtual DbSet Dexterities { get; set; } + public virtual DbSet Intelligences { get; set; } public virtual DbSet Races { get; set; } public virtual DbSet Statistics { get; set; } + public virtual DbSet Strengths { get; set; } public virtual DbSet Users { get; set; } + public virtual DbSet Wisdoms { get; set; } public ApplicationDbContext(DbContextOptions options) : base(options) { } diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Character.cs b/SessionCompanion/SessionCompanion.Database/Tables/Character.cs index 0c2cff7..95ceed4 100644 --- a/SessionCompanion/SessionCompanion.Database/Tables/Character.cs +++ b/SessionCompanion/SessionCompanion.Database/Tables/Character.cs @@ -13,5 +13,11 @@ namespace SessionCompanion.Database.Tables public virtual User User { get; set; } public virtual Biography Biography { get; set; } public virtual Statistics Statistics { get; set; } + public virtual Charisma Charisma { get; set; } + public virtual Constitution Constitution { get; set; } + public virtual Dexterity Dexterity { get; set; } + public virtual Intelligence Intelligence { get; set; } + public virtual Strength Strength { get; set; } + public virtual Wisdom Wisdom { get; set; } } } diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Charisma.cs b/SessionCompanion/SessionCompanion.Database/Tables/Charisma.cs new file mode 100644 index 0000000..142505e --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Charisma.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace SessionCompanion.Database.Tables +{ + public class Charisma : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Deception { get; set; } + public bool CanDeception { get; set; } + public int Intimidation { get; set; } + public bool CanIntimidation { get; set; } + public int Performance { get; set; } + public bool CanPerformance { get; set; } + public int Persuasion { get; set; } + public bool CanPersuasion { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Constitution.cs b/SessionCompanion/SessionCompanion.Database/Tables/Constitution.cs new file mode 100644 index 0000000..b204712 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Constitution.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace SessionCompanion.Database.Tables +{ + public class Constitution : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Dexterity.cs b/SessionCompanion/SessionCompanion.Database/Tables/Dexterity.cs new file mode 100644 index 0000000..7be93cc --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Dexterity.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace SessionCompanion.Database.Tables +{ + public class Dexterity : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Acrobatics { get; set; } + public bool CanAcrobatics { get; set; } + public int SleightOfHand { get; set; } + public bool CanSleightOfHand { get; set; } + public int Stealth { get; set; } + public bool CanStealth { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Intelligence.cs b/SessionCompanion/SessionCompanion.Database/Tables/Intelligence.cs new file mode 100644 index 0000000..6a1297b --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Intelligence.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace SessionCompanion.Database.Tables +{ + public class Intelligence : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Arcana { get; set; } + public bool CanArcana { get; set; } + public int History { get; set; } + public bool CanHistory { get; set; } + public int Investigation { get; set; } + public bool CanInvestigation { get; set; } + public int Nature { get; set; } + public bool CanNature { get; set; } + public int Religion { get; set; } + public bool CanReligion { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Strength.cs b/SessionCompanion/SessionCompanion.Database/Tables/Strength.cs new file mode 100644 index 0000000..c7cd316 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Strength.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace SessionCompanion.Database.Tables +{ + public class Strength : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int Athletics { get; set; } + public bool CanAthletics { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Wisdom.cs b/SessionCompanion/SessionCompanion.Database/Tables/Wisdom.cs new file mode 100644 index 0000000..f5b9cc6 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Wisdom.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace SessionCompanion.Database.Tables +{ + public class Wisdom : BaseEntity + { + [ForeignKey(nameof(Character))] + public int CharacterId { get; set; } + public virtual Character Character { get; set; } + + public int Value { get; set; } + public int Modification { get; set; } + public int SavingThrows { get; set; } + public bool CanSaveThrows { get; set; } + public int AnimalHandling { get; set; } + public bool CanAnimalHandling { get; set; } + public int Insight { get; set; } + public bool CanInsight { get; set; } + public int Medicine { get; set; } + public bool CanMedicine { get; set; } + public int Perception { get; set; } + public bool CanPerception { get; set; } + public int Survival { get; set; } + public bool CanSurvival { get; set; } + } +}