2021-10-01 05:34:11 +00: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.
2021-11-15 05:34:50 +00:00
using System ;
2021-10-01 05:34:11 +00:00
#nullable enable
2021-10-01 07:31:11 +00:00
namespace osu.Game.Database
2021-10-01 05:34:11 +00:00
{
2021-10-29 02:48:36 +00:00
public interface IHasOnlineID < out T >
2021-11-15 05:34:50 +00:00
where T : IEquatable < T >
2021-10-01 05:34:11 +00:00
{
/// <summary>
2021-10-29 07:53:54 +00:00
/// The server-side ID representing this instance, if one exists. Any value 0 or less denotes a missing ID (except in special cases where autoincrement is not used, like rulesets).
2021-10-01 05:34:11 +00:00
/// </summary>
2021-10-20 06:24:27 +00:00
/// <remarks>
/// Generally we use -1 when specifying "missing" in code, but values of 0 are also considered missing as the online source
/// is generally a MySQL autoincrement value, which can never be 0.
/// </remarks>
2021-10-29 02:48:36 +00:00
T OnlineID { get ; }
2021-10-01 05:34:11 +00:00
}
}