mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 22:47:24 +08:00
Add IsManaged
helper method to EF classes to match realm implementation
This commit is contained in:
parent
d397524878
commit
eecf6ad558
@ -15,6 +15,8 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public float DrainRate { get; set; } = DEFAULT_DIFFICULTY;
|
||||
public float CircleSize { get; set; } = DEFAULT_DIFFICULTY;
|
||||
public float OverallDifficulty { get; set; } = DEFAULT_DIFFICULTY;
|
||||
|
@ -21,6 +21,8 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public int BeatmapVersion;
|
||||
|
||||
private int? onlineID;
|
||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("title_unicode")]
|
||||
|
@ -11,6 +11,8 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public int BeatmapSetInfoID { get; set; }
|
||||
|
||||
public int FileInfoID { get; set; }
|
||||
|
@ -16,6 +16,8 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
private int? onlineID;
|
||||
|
||||
[Column("OnlineBeatmapSetID")]
|
||||
|
@ -11,6 +11,8 @@ namespace osu.Game.Configuration
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public int? RulesetID { get; set; }
|
||||
|
||||
public int? Variant { get; set; }
|
||||
|
@ -11,5 +11,7 @@ namespace osu.Game.Database
|
||||
[JsonIgnore]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
int ID { get; set; }
|
||||
|
||||
bool IsManaged { get; }
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,8 @@ namespace osu.Game.IO
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public string Hash { get; set; }
|
||||
|
||||
public string StoragePath => Path.Combine(Hash.Remove(1), Hash.Remove(2), Hash);
|
||||
|
@ -11,6 +11,8 @@ namespace osu.Game.Scoring
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public int FileInfoID { get; set; }
|
||||
|
||||
public FileInfo FileInfo { get; set; }
|
||||
|
@ -22,6 +22,8 @@ namespace osu.Game.Scoring
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public ScoreRank Rank { get; set; }
|
||||
|
||||
public long TotalScore { get; set; }
|
||||
|
@ -11,6 +11,8 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public int SkinInfoID { get; set; }
|
||||
|
||||
public int FileInfoID { get; set; }
|
||||
|
@ -18,6 +18,8 @@ namespace osu.Game.Skinning
|
||||
|
||||
public int ID { get; set; }
|
||||
|
||||
public bool IsManaged => ID > 0;
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public string Creator { get; set; } = string.Empty;
|
||||
|
Loading…
Reference in New Issue
Block a user