Updated Db files
This commit is contained in:
parent
a63889b2f3
commit
0f927a3dd1
3 changed files with 3 additions and 40 deletions
|
@ -53,8 +53,6 @@ public abstract class EllieContext : DbContext
|
||||||
|
|
||||||
public DbSet<PatronUser> Patrons { get; set; }
|
public DbSet<PatronUser> Patrons { get; set; }
|
||||||
|
|
||||||
public DbSet<PatronQuota> PatronQuotas { get; set; }
|
|
||||||
|
|
||||||
public DbSet<StreamOnlineMessage> StreamOnlineMessages { get; set; }
|
public DbSet<StreamOnlineMessage> StreamOnlineMessages { get; set; }
|
||||||
|
|
||||||
public DbSet<StickyRole> StickyRoles { get; set; }
|
public DbSet<StickyRole> StickyRoles { get; set; }
|
||||||
|
@ -597,16 +595,6 @@ public abstract class EllieContext : DbContext
|
||||||
});
|
});
|
||||||
|
|
||||||
// quotes are per user id
|
// quotes are per user id
|
||||||
modelBuilder.Entity<PatronQuota>(pq =>
|
|
||||||
{
|
|
||||||
pq.HasIndex(x => x.UserId).IsUnique(false);
|
|
||||||
pq.HasKey(x => new
|
|
||||||
{
|
|
||||||
x.UserId,
|
|
||||||
x.FeatureType,
|
|
||||||
x.Feature
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace EllieBot.Db.Models;
|
namespace EllieBot.Db.Models;
|
||||||
|
|
||||||
|
|
||||||
public class AntiRaidSetting : DbEntity
|
public class AntiRaidSetting : DbEntity
|
||||||
{
|
{
|
||||||
public int GuildConfigId { get; set; }
|
public int GuildConfigId { get; set; }
|
||||||
|
|
|
@ -1,30 +1,6 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
namespace EllieBot.Db.Models;
|
namespace EllieBot.Db.Models;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Contains data about usage of Patron-Only commands per user
|
|
||||||
/// in order to provide support for quota limitations
|
|
||||||
/// (allow user x who is pledging amount y to use the specified command only
|
|
||||||
/// x amount of times in the specified time period)
|
|
||||||
/// </summary>
|
|
||||||
public class PatronQuota
|
|
||||||
{
|
|
||||||
public ulong UserId { get; set; }
|
|
||||||
public FeatureType FeatureType { get; set; }
|
|
||||||
public string Feature { get; set; }
|
|
||||||
public uint HourlyCount { get; set; }
|
|
||||||
public uint DailyCount { get; set; }
|
|
||||||
public uint MonthlyCount { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum FeatureType
|
|
||||||
{
|
|
||||||
Command,
|
|
||||||
Group,
|
|
||||||
Module,
|
|
||||||
Limit
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PatronUser
|
public class PatronUser
|
||||||
{
|
{
|
||||||
public string UniquePlatformUserId { get; set; }
|
public string UniquePlatformUserId { get; set; }
|
||||||
|
|
Loading…
Reference in a new issue