forked from siteserver/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathILogRepository.cs
More file actions
38 lines (25 loc) · 1.36 KB
/
ILogRepository.cs
File metadata and controls
38 lines (25 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Datory;
using SSCMS.Models;
namespace SSCMS.Repositories
{
public interface ILogRepository : IRepository
{
Task AddAdminLogAsync(Administrator admin, string action, string summary = "");
Task AddUserLogAsync(User user, string action, string summary = "");
Task DeleteIfThresholdAsync();
Task DeleteAllAdminLogsAsync();
Task DeleteAllUserLogsAsync();
Task<int> GetAdminLogsCountAsync(int adminId, string keyword, string dateFrom, string dateTo);
Task<List<Log>> GetAdminLogsAsync(int adminId, string keyword, string dateFrom, string dateTo, int offset, int limit);
Task<int> GetUserLogsCountAsync(int userId, string keyword, string dateFrom, string dateTo);
Task<List<Log>> GetUserLogsAsync(int userId, string keyword, string dateFrom, string dateTo, int offset, int limit);
Dictionary<DateTime, int> GetAdminLoginDictionaryByDate(DateTime dateFrom, DateTime dateTo, string xType, string actionType);
Task<Dictionary<string, int>> GetAdminLoginDictionaryByNameAsync(DateTime dateFrom, DateTime dateTo,
string actionType);
Task<List<Log>> GetUserLogsAsync(int userId, int offset, int limit);
Task<List<Log>> GetAdminLogsAsync(int adminId, int offset, int limit);
}
}