Adding ExperiencePoints table and Model
This commit is contained in:
parent
f1577ba5b7
commit
56edd20562
@ -11,6 +11,7 @@ namespace ChaosBot.Models
|
||||
public DbSet<Raffle> Raffles { get; set; }
|
||||
public DbSet<CommandPermission> CommandPermissions { get; set; }
|
||||
public DbSet<Configuration> Configuration { get; set; }
|
||||
public DbSet<Experience> ExperiencePoints { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
@ -41,6 +42,8 @@ namespace ChaosBot.Models
|
||||
.HasKey(x => new {x.DiscordGuildId, x.LodestoneId});
|
||||
modelBuilder.Entity<Point>()
|
||||
.HasKey(x => new {x.DiscordGuildId, x.DiscordUserId});
|
||||
modelBuilder.Entity<Experience>()
|
||||
.HasKey(x => new {x.DiscordGuildId, x.DiscordUserId});
|
||||
modelBuilder.Entity<Configuration>()
|
||||
.HasKey(x => new {x.DiscordGuildId, x.Key});
|
||||
}
|
||||
|
||||
15
ChaosBot/Models/Experience.cs
Normal file
15
ChaosBot/Models/Experience.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ChaosBot.Models
|
||||
{
|
||||
#region Required
|
||||
public class Experience
|
||||
{
|
||||
[Required]
|
||||
public ulong DiscordUserId { get; set; }
|
||||
[Required]
|
||||
public ulong DiscordGuildId { get; set; }
|
||||
public ulong Amount { get; set; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user