1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Add IsTopLevel property

This commit is contained in:
Andrei Zavatski 2019-10-07 16:58:24 +03:00
parent 76db200bd3
commit 738580ec61

View File

@ -11,8 +11,18 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"id")]
public long Id { get; set; }
private long? parentId;
[JsonProperty(@"parent_id")]
public long ParentId { get; set; }
public long? ParentId
{
get => parentId;
set
{
parentId = value;
IsTopLevel = value != null;
}
}
[JsonProperty(@"user_id")]
public long UserId { get; set; }
@ -52,5 +62,7 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"edited_by_id")]
public long EditedById { get; set; }
public bool IsTopLevel { get; set; }
}
}