Added .warn weights, improved .warnlog

This commit is contained in:
Kwoth
2021-11-21 02:01:21 +01:00
parent 0a029a7847
commit 22b452e449
10 changed files with 2733 additions and 12 deletions

View File

@@ -196,10 +196,16 @@ namespace NadekoBot.Services.Database
#endregion
#region Warnings
var warn = modelBuilder.Entity<Warning>();
warn.HasIndex(x => x.GuildId);
warn.HasIndex(x => x.UserId);
warn.HasIndex(x => x.DateAdded);
modelBuilder.Entity<Warning>(warn =>
{
warn.HasIndex(x => x.GuildId);
warn.HasIndex(x => x.UserId);
warn.HasIndex(x => x.DateAdded);
warn.Property(x => x.Weight)
.HasDefaultValue(1);
});
#endregion
#region PatreonRewards