2021-08-22 01:21:45 +08: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;
|
|
|
|
|
2021-09-15 16:09:02 +08:00
|
|
|
#nullable enable
|
|
|
|
|
2021-08-22 01:21:45 +08:00
|
|
|
namespace osu.Game.Configuration
|
|
|
|
{
|
2021-09-15 15:55:42 +08:00
|
|
|
[MapTo(@"RulesetSetting")]
|
|
|
|
public class RealmRulesetSetting : RealmObject, IHasGuidPrimaryKey
|
2021-08-22 01:21:45 +08:00
|
|
|
{
|
|
|
|
[PrimaryKey]
|
|
|
|
public Guid ID { get; set; } = Guid.NewGuid();
|
|
|
|
|
2021-09-15 16:01:31 +08:00
|
|
|
[Indexed]
|
|
|
|
public int RulesetID { get; set; }
|
2021-08-22 01:21:45 +08:00
|
|
|
|
2021-09-15 16:09:02 +08:00
|
|
|
[Indexed]
|
|
|
|
public int Variant { get; set; }
|
2021-08-22 01:21:45 +08:00
|
|
|
|
2021-09-15 16:12:00 +08:00
|
|
|
[Required]
|
2021-09-15 16:09:02 +08:00
|
|
|
public string Key { get; set; } = string.Empty;
|
2021-08-22 01:21:45 +08:00
|
|
|
|
2021-09-15 16:12:00 +08:00
|
|
|
[Required]
|
|
|
|
public string Value { get; set; } = string.Empty;
|
2021-08-22 01:21:45 +08:00
|
|
|
|
2021-09-15 16:12:00 +08:00
|
|
|
public override string ToString() => $"{Key} => {Value}";
|
2021-08-22 01:21:45 +08:00
|
|
|
}
|
|
|
|
}
|