re-added .xpex and .xpexl commands as there was no way to exclude users and roles from the xp system anymore
This commit is contained in:
parent
ca46786c5e
commit
1d667db598
19 changed files with 631 additions and 169 deletions
src/EllieBot/Db/Models/xp
31
src/EllieBot/Db/Models/xp/XpExcludedItem.cs
Normal file
31
src/EllieBot/Db/Models/xp/XpExcludedItem.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace EllieBot.Db.Models;
|
||||
|
||||
public class XpExcludedItem
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public ulong GuildId { get; set; }
|
||||
|
||||
public XpExcludedItemType ItemType { get; set; }
|
||||
public ulong ItemId { get; set; }
|
||||
}
|
||||
|
||||
public sealed class XpExclusionEntityConfig : IEntityTypeConfiguration<XpExcludedItem>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<XpExcludedItem> builder)
|
||||
{
|
||||
builder.HasIndex(x => x.GuildId);
|
||||
|
||||
builder.HasAlternateKey(x => new
|
||||
{
|
||||
x.GuildId,
|
||||
x.ItemType,
|
||||
x.ItemId
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue