bank account refactor

This commit is contained in:
hydrant
2020-03-15 21:33:04 +01:00
parent 75e26b8e8a
commit 92c054c90c
30 changed files with 2088 additions and 300 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using Microsoft.Extensions.Logging;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Core.API;
using ReallifeGamemode.Server.Log;
@@ -11,8 +12,9 @@ namespace ReallifeGamemode.Server.Core.Commands
{
public abstract bool CanExecute(IPlayer player);
protected abstract IAPI Api { get; }
protected IAPI Api => Main.API;
protected ILogger Log { get; set; }
public abstract string CommandName { get; }
public virtual string HelpText { get; } = null;
@@ -20,5 +22,7 @@ namespace ReallifeGamemode.Server.Core.Commands
{
Log = LogManager.GetLogger(this.GetType());
}
protected DatabaseContext GetDbContext() => Main.GetDbContext();
}
}