Switch realm ruleset configuration to use ruleset's ShortName as key

This commit is contained in:
Dean Herbert
2021-11-22 18:07:28 +09:00
parent ca26b6c540
commit 329bae50b0
4 changed files with 34 additions and 17 deletions

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Game.Database;
using Realms;
#nullable enable
@ -10,13 +8,10 @@ using Realms;
namespace osu.Game.Configuration
{
[MapTo(@"RulesetSetting")]
public class RealmRulesetSetting : RealmObject, IHasGuidPrimaryKey
public class RealmRulesetSetting : RealmObject
{
[PrimaryKey]
public Guid ID { get; set; } = Guid.NewGuid();
[Indexed]
public int RulesetID { get; set; }
public string RulesetName { get; set; } = string.Empty;
[Indexed]
public int Variant { get; set; }