2021-08-21 17:21:45 +00:00
|
|
|
// 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;
|
|
|
|
|
|
|
|
namespace osu.Game.Configuration
|
|
|
|
{
|
2021-09-15 07:55:42 +00:00
|
|
|
[MapTo(@"RulesetSetting")]
|
|
|
|
public class RealmRulesetSetting : RealmObject, IHasGuidPrimaryKey
|
2021-08-21 17:21:45 +00:00
|
|
|
{
|
|
|
|
[PrimaryKey]
|
|
|
|
public Guid ID { get; set; } = Guid.NewGuid();
|
|
|
|
|
2021-09-15 08:01:31 +00:00
|
|
|
[Indexed]
|
|
|
|
public int RulesetID { get; set; }
|
2021-08-21 17:21:45 +00:00
|
|
|
|
|
|
|
public int? Variant { get; set; }
|
|
|
|
|
|
|
|
public string Key { get; set; }
|
|
|
|
|
|
|
|
[MapTo(nameof(Value))]
|
|
|
|
public string ValueString { get; set; }
|
|
|
|
|
|
|
|
public object Value
|
|
|
|
{
|
|
|
|
get => ValueString;
|
|
|
|
set => ValueString = value.ToString();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override string ToString() => $"{Key}=>{Value}";
|
|
|
|
}
|
|
|
|
}
|