21 lines
552 B
C#
21 lines
552 B
C#
namespace AuthorBuddy.Web.Services;
|
|
|
|
public class DbCollectionInfo
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
public int Count { get; set; }
|
|
}
|
|
|
|
public class DbRecord
|
|
{
|
|
public int Id { get; set; }
|
|
public Dictionary<string, string?> Fields { get; set; } = new();
|
|
}
|
|
|
|
public interface IDbAdminService
|
|
{
|
|
List<DbCollectionInfo> GetCollections();
|
|
List<DbRecord> GetAll(string collectionName);
|
|
bool Update(string collectionName, int id, Dictionary<string, string?> values);
|
|
bool Delete(string collectionName, int id);
|
|
}
|