mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 23:33:23 +08:00
Add helper setter to EF RulesetInfo.OnlineID
to allow updating usages
This commit is contained in:
parent
db2d8b6d8b
commit
e57c343531
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
@ -65,7 +66,12 @@ namespace osu.Game.Rulesets
|
|||||||
|
|
||||||
#region Implementation of IHasOnlineID
|
#region Implementation of IHasOnlineID
|
||||||
|
|
||||||
public int OnlineID => ID ?? -1;
|
[NotMapped]
|
||||||
|
public int OnlineID
|
||||||
|
{
|
||||||
|
get => ID ?? -1;
|
||||||
|
set => ID = value >= 0 ? value : (int?)null;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user