mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Change IBeatmapMetadataInfo.Author
to be an IUser
This commit is contained in:
@ -5,6 +5,7 @@ using System;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Users;
|
||||
using Realms;
|
||||
|
||||
#nullable enable
|
||||
@ -26,7 +27,7 @@ namespace osu.Game.Models
|
||||
[JsonProperty("artist_unicode")]
|
||||
public string ArtistUnicode { get; set; } = string.Empty;
|
||||
|
||||
public string Author { get; set; } = string.Empty; // eventually should be linked to a persisted User.
|
||||
public RealmUser Author { get; set; } = new RealmUser();
|
||||
|
||||
public string Source { get; set; } = string.Empty;
|
||||
|
||||
@ -41,5 +42,7 @@ namespace osu.Game.Models
|
||||
|
||||
public string AudioFile { get; set; } = string.Empty;
|
||||
public string BackgroundFile { get; set; } = string.Empty;
|
||||
|
||||
IUser IBeatmapMetadataInfo.Author => Author;
|
||||
}
|
||||
}
|
||||
|
15
osu.Game/Models/RealmUser.cs
Normal file
15
osu.Game/Models/RealmUser.cs
Normal file
@ -0,0 +1,15 @@
|
||||
// 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 osu.Game.Users;
|
||||
using Realms;
|
||||
|
||||
namespace osu.Game.Models
|
||||
{
|
||||
public class RealmUser : EmbeddedObject, IUser
|
||||
{
|
||||
public int OnlineID { get; set; } = 1;
|
||||
|
||||
public string Username { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user