Use realm support for Guid

This commit is contained in:
Dean Herbert
2021-01-19 18:22:23 +09:00
parent 15db0e97d7
commit 68f2e7f61a
5 changed files with 15 additions and 15 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Realms;
@ -11,16 +10,7 @@ namespace osu.Game.Database
public interface IHasGuidPrimaryKey
{
[JsonIgnore]
[Ignored]
public Guid Guid
{
get => new Guid(ID);
set => ID = value.ToString();
}
[JsonIgnore]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[PrimaryKey]
string ID { get; set; }
public Guid ID { get; set; }
}
}