Store user country on databased scores

This commit is contained in:
Salman Ahmed
2022-07-16 06:30:25 +03:00
parent 4968859e69
commit 4e7156cee8
5 changed files with 20 additions and 5 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.
#nullable disable
using System;
using osu.Game.Database;
using osu.Game.Users;
@ -17,6 +15,16 @@ namespace osu.Game.Models
public string Username { get; set; } = string.Empty;
[Ignored]
public Country Country
{
get => Enum.TryParse(CountryString, out Country country) ? country : default;
set => CountryString = value.ToString();
}
[MapTo(nameof(Country))]
public string CountryString { get; set; } = default(Country).ToString();
public bool IsBot => false;
public bool Equals(RealmUser other)