mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Finished implementing xp shop. It allows users to buy frames and backgrounds if the user enables the feature in data/xp.yml. It can also be available only to patrons
This commit is contained in:
@@ -454,6 +454,23 @@ public abstract class NadekoContext : DbContext
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Xp Item Shop
|
||||
|
||||
modelBuilder.Entity<XpShopOwnedItem>(
|
||||
x =>
|
||||
{
|
||||
// user can own only one of each item
|
||||
x.HasIndex(model => new
|
||||
{
|
||||
model.UserId,
|
||||
model.ItemType,
|
||||
model.ItemKey
|
||||
})
|
||||
.IsUnique();
|
||||
});
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
Reference in New Issue
Block a user