From 3135c8965d6931c5f713d6eff82b778bdc08f212 Mon Sep 17 00:00:00 2001 From: Sean Stoves Date: Mon, 3 Aug 2020 22:24:40 -0400 Subject: [PATCH] Adding LevelUp Model --- ChaosBot/ChaosBot.csproj | 4 ---- ChaosBot/Models/LevelUp.cs | 15 +++++++++++++++ ChaosBot/Models/chaosbotContext.cs | 28 ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 ChaosBot/Models/LevelUp.cs diff --git a/ChaosBot/ChaosBot.csproj b/ChaosBot/ChaosBot.csproj index cf65c22..851f962 100644 --- a/ChaosBot/ChaosBot.csproj +++ b/ChaosBot/ChaosBot.csproj @@ -27,8 +27,4 @@ - - - - diff --git a/ChaosBot/Models/LevelUp.cs b/ChaosBot/Models/LevelUp.cs new file mode 100644 index 0000000..32d46ab --- /dev/null +++ b/ChaosBot/Models/LevelUp.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace ChaosBot.Models +{ + public partial class LevelUp + { + public int? Id { get; set; } + public long? UserId { get; set; } + public long? GuildId { get; set; } + public long? Experience { get; set; } + } +} diff --git a/ChaosBot/Models/chaosbotContext.cs b/ChaosBot/Models/chaosbotContext.cs index 6d68ac5..d6da8cf 100644 --- a/ChaosBot/Models/chaosbotContext.cs +++ b/ChaosBot/Models/chaosbotContext.cs @@ -135,6 +135,34 @@ namespace ChaosBot.Models .HasAnnotation("Relational:ColumnType", "bigint(20)"); }); + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + + entity.ToTable("LevelTable"); + + entity.Property(e => e.GuildId) + .HasColumnType("bigint(20)") + .HasColumnName("guildId") + .HasAnnotation("Relational:ColumnType", "bigint(20)"); + + entity.Property(e => e.Id) + .HasColumnType("int(11)") + .HasColumnName("id") + .HasAnnotation("Relational:ColumnType", "int(11)"); + + entity.Property(e => e.UserId) + .HasColumnType("bigint(20)") + .HasColumnName("userId") + .HasAnnotation("Relational:ColumnType", "bigint(20)"); + + entity.Property(e => e.Experience) + .HasColumnType("bigint(20)") + .HasColumnName("xp") + .HasAnnotation("Relational:ColumnType", "bigint(20)"); + + }); + modelBuilder.Entity(entity => { entity.HasNoKey();