aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Interfaces/Repositories/IUserRepository.cs
blob: 5b6ab9eaa6ff34f3bf52a41dc3db058e7b1b357b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DevHive.Data.Models;
using DevHive.Data.Repositories.Interfaces;

namespace DevHive.Data.Interfaces.Repositories
{
	public interface IUserRepository : IRepository<User>
	{
		//Read
		Task<User> GetByUsernameAsync(string username);
		IEnumerable<User> QueryAll();
		Task<bool> UpdateProfilePicture(Guid userId, string pictureUrl);

		//Validations
		Task<bool> DoesEmailExistAsync(string email);
		Task<bool> DoesUserExistAsync(Guid id);
		Task<bool> DoesUserHaveThisFriendAsync(Guid userId, Guid friendId);
		bool DoesUserHaveThisUsername(Guid id, string username);
		Task<bool> DoesUsernameExistAsync(string username);
	}
}