2021-01-07 05:07:36 +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.
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
using Newtonsoft.Json;
|
2021-01-07 06:41:58 +00:00
|
|
|
using Realms;
|
2021-01-07 05:07:36 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Database
|
|
|
|
{
|
|
|
|
public interface IHasGuidPrimaryKey
|
|
|
|
{
|
2021-01-07 06:41:58 +00:00
|
|
|
[JsonIgnore]
|
|
|
|
[Ignored]
|
|
|
|
public Guid Guid
|
|
|
|
{
|
|
|
|
get => new Guid(ID);
|
|
|
|
set => ID = value.ToString();
|
|
|
|
}
|
|
|
|
|
2021-01-07 05:07:36 +00:00
|
|
|
[JsonIgnore]
|
|
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
2021-01-07 06:41:58 +00:00
|
|
|
string ID { get; set; }
|
2021-01-07 05:07:36 +00:00
|
|
|
}
|
|
|
|
}
|