mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Rework EF Core usage in model classes
This commit is contained in:
@ -1,22 +1,18 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Input.Bindings
|
||||
{
|
||||
[Table("KeyBinding")]
|
||||
public class DatabasedKeyBinding : KeyBinding
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey(nameof(RulesetInfo))]
|
||||
public int? RulesetInfoId { get; set; }
|
||||
public RulesetInfo RulesetInfo;
|
||||
|
||||
public int? Variant { get; set; }
|
||||
|
||||
|
@ -51,4 +51,4 @@ namespace osu.Game.Input.Bindings
|
||||
KeyBindings = store.Query(ruleset?.Id, variant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user