1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 05:42:56 +08:00

Merge pull request #15782 from peppy/realm-beatmap-set-status

Add online status to `RealmBeatmapSet`
This commit is contained in:
Dan Balasescu 2021-11-24 20:28:45 +09:00 committed by GitHub
commit 593f11d0ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View File

@ -42,8 +42,9 @@ namespace osu.Game.Database
/// 9 2021-11-04 Converted BeatmapMetadata.Author from string to RealmUser.
/// 10 2021-11-22 Use ShortName instead of RulesetID for ruleset settings.
/// 11 2021-11-22 Use ShortName instead of RulesetID for ruleset key bindings.
/// 12 2021-11-24 Add Status to RealmBeatmapSet.
/// </summary>
private const int schema_version = 11;
private const int schema_version = 12;
/// <summary>
/// Lock object which is held during <see cref="BlockAllOperations"/> sections, blocking context creation during blocking periods.

View File

@ -46,7 +46,7 @@ namespace osu.Game.Models
}
[MapTo(nameof(Status))]
public int StatusInt { get; set; }
public int StatusInt { get; set; } = (int)BeatmapOnlineStatus.None;
[Indexed]
public int OnlineID { get; set; } = -1;

View File

@ -32,6 +32,15 @@ namespace osu.Game.Models
public IList<RealmNamedFileUsage> Files { get; } = null!;
public BeatmapOnlineStatus Status
{
get => (BeatmapOnlineStatus)StatusInt;
set => StatusInt = (int)value;
}
[MapTo(nameof(Status))]
public int StatusInt { get; set; } = (int)BeatmapOnlineStatus.None;
public bool DeletePending { get; set; }
public string Hash { get; set; } = string.Empty;