2024-11-01 12:52:37 +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 Newtonsoft.Json;
|
2024-11-01 19:15:20 +08:00
|
|
|
using Newtonsoft.Json.Converters;
|
2024-11-01 12:52:37 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Online.API.Requests.Responses
|
|
|
|
{
|
|
|
|
public class APIRelation
|
|
|
|
{
|
|
|
|
[JsonProperty("target_id")]
|
|
|
|
public int TargetID { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty("relation_type")]
|
|
|
|
public RelationType RelationType { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty("mutual")]
|
|
|
|
public bool Mutual { get; set; }
|
|
|
|
|
|
|
|
[JsonProperty("target")]
|
|
|
|
public APIUser? TargetUser { get; set; }
|
|
|
|
}
|
|
|
|
|
2024-11-01 19:15:20 +08:00
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
2024-11-01 12:52:37 +08:00
|
|
|
public enum RelationType
|
|
|
|
{
|
|
|
|
Friend,
|
|
|
|
Block,
|
|
|
|
}
|
|
|
|
}
|