2021-10-15 10:27:38 +00:00
|
|
|
using Dapper;
|
|
|
|
|
2021-11-27 02:10:56 +00:00
|
|
|
namespace PluralKit.Core;
|
2021-10-15 10:27:38 +00:00
|
|
|
|
2021-11-27 02:10:56 +00:00
|
|
|
public partial class ModelRepository
|
2021-10-15 10:27:38 +00:00
|
|
|
{
|
2021-11-27 02:10:56 +00:00
|
|
|
public Task<Counts> GetStats()
|
|
|
|
=> _db.Execute(conn => conn.QuerySingleAsync<Counts>("select * from info"));
|
2021-10-15 10:27:38 +00:00
|
|
|
|
2021-11-27 02:10:56 +00:00
|
|
|
public class Counts
|
|
|
|
{
|
|
|
|
public int SystemCount { get; }
|
|
|
|
public int MemberCount { get; }
|
|
|
|
public int GroupCount { get; }
|
|
|
|
public int SwitchCount { get; }
|
|
|
|
public int MessageCount { get; }
|
2021-10-15 10:27:38 +00:00
|
|
|
}
|
|
|
|
}
|