forked from siteserver/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIUserRepository.cs
More file actions
57 lines (36 loc) · 1.84 KB
/
IUserRepository.cs
File metadata and controls
57 lines (36 loc) · 1.84 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Datory;
using SSCMS.Enums;
using SSCMS.Models;
namespace SSCMS.Repositories
{
public partial interface IUserRepository : IRepository
{
Task<(User user, string errorMessage)> InsertAsync(User user, string password, string ipAddress);
Task<(bool success, string errorMessage)> UpdateAsync(User user);
Task UpdateLastActivityDateAndCountOfLoginAsync(User user);
Task UpdateLastActivityDateAsync(User user);
Task<(bool success, string errorMessage)> ChangePasswordAsync(int userId, string password);
Task<(bool success, string errorMessage)> IsPasswordCorrectAsync(string password);
Task CheckAsync(IList<int> userIds);
Task LockAsync(IList<int> userIds);
Task UnLockAsync(IList<int> userIds);
Task<bool> IsUserNameExistsAsync(string userName);
Task<bool> IsEmailExistsAsync(string email);
Task<bool> IsMobileExistsAsync(string mobile);
Task<List<int>> GetUserIdsAsync(bool isChecked);
bool CheckPassword(string password, bool isPasswordMd5, string dbPassword, PasswordFormat passwordFormat,
string passwordSalt);
Task<(User user, string userName, string errorMessage)> ValidateAsync(string account, string password,
bool isPasswordMd5);
Dictionary<DateTime, int> GetTrackingDictionary(DateTime dateFrom, DateTime dateTo, string xType);
Task<int> GetCountAsync();
Task<int> GetCountAsync(bool? state, int groupId, int dayOfLastActivity, string keyword);
Task<List<User>> GetUsersAsync(bool? state, int groupId, int dayOfLastActivity, string keyword, string order,
int offset, int limit);
Task<bool> IsExistsAsync(int id);
Task<User> DeleteAsync(int userId);
}
}