mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
// 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.Collections.Generic;
|
|
using JetBrains.Annotations;
|
|
using osu.Game.Database;
|
|
using Realms;
|
|
|
|
namespace osu.Game.Beatmaps
|
|
{
|
|
public class RealmBeatmapCollection : RealmObject, IHasGuidPrimaryKey
|
|
{
|
|
[PrimaryKey]
|
|
public Guid ID { get; }
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public List<string> BeatmapMD5Hashes { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// The date when this collection was last modified.
|
|
/// </summary>
|
|
public DateTimeOffset LastModified { get; set; }
|
|
|
|
public RealmBeatmapCollection(string? name, List<string>? beatmapMD5Hashes)
|
|
{
|
|
ID = Guid.NewGuid();
|
|
Name = name ?? string.Empty;
|
|
BeatmapMD5Hashes = beatmapMD5Hashes ?? new List<string>();
|
|
|
|
LastModified = DateTimeOffset.UtcNow;
|
|
}
|
|
|
|
[UsedImplicitly]
|
|
private RealmBeatmapCollection()
|
|
{
|
|
}
|
|
}
|
|
}
|