diff --git a/SessionCompanion/SessionCompanion.Database/Tables/Shopkeeper.cs b/SessionCompanion/SessionCompanion.Database/Tables/Shopkeeper.cs new file mode 100644 index 0000000..7beeb4a --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/Shopkeeper.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class Shopkeeper : BaseEntity + { + public string Name { get; set; } + + public bool IsAvailable { get; set; } + + public virtual ICollection ShopkeeperItems { get; set; } + } +} diff --git a/SessionCompanion/SessionCompanion.Database/Tables/ShopkeeperItem.cs b/SessionCompanion/SessionCompanion.Database/Tables/ShopkeeperItem.cs new file mode 100644 index 0000000..be335e4 --- /dev/null +++ b/SessionCompanion/SessionCompanion.Database/Tables/ShopkeeperItem.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SessionCompanion.Database.Tables +{ + public class ShopkeeperItem : BaseEntity + { + [ForeignKey(nameof(Shopkeeper))] + public int ShopkeeperId { get; set; } + public virtual Shopkeeper Shopkeeper { get; set; } + + [ForeignKey(nameof(Armor))] + public int? ArmorId { get; set; } + public virtual Armor Armor { get; set; } + + [ForeignKey(nameof(Weapon))] + public int? WeaponId { get; set; } + public virtual Weapon Weapon { get; set; } + + public int Amount { get; set; } + } +}