Skip to content
Snippets Groups Projects
IUserService.cs 1.44 KiB
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Tsi1.BusinessLayer.Dtos;
using Tsi1.BusinessLayer.Helpers;
using Tsi1.DataLayer.Entities;

namespace Tsi1.BusinessLayer.Interfaces
{
    public interface IUserService
    {
        Task<ServiceResult<User>> Authenticate(string username, string password, int tenantId);

        Task<ServiceResult<int>> Create(UserRegisterDto dto, string type, int tenantId);

        Task<ServiceResult<List<UserDetailDto>>> GetAll(int tenantId);

        Task<ServiceResult<UserDetailDto>> GetById(int userId);

        Task<ServiceResult<User>> GetByIdentityCard(string IdentityCard);

        Task<ServiceResult<User>> GetByUsername(string username, int tenantId);

        Task<ServiceResult<bool>> UpdatePassword(int userId, string password);

        Task<ServiceResult<bool>> Modify(UserModifyDto dto, string type, int userId);

        Task<ServiceResult<int>> GetTenant(int userId);

        Task<ServiceResult<bool>> Delete(int userId);

        Task<ServiceResult<UserTypeDto>> GetUserType(int userId);

        Task<ServiceResult<List<UserPreviewDto>>> GetStudents(int tenantId);

        Task<ServiceResult<List<UserPreviewDto>>> GetProfessors(int tenantId);
        Task<ServiceResult<List<UserPreviewDto>>> GetAdmins(int tenantId, string userType);

        ServiceResult<List<UserGradeDto>> GetUserGrades(List<StudentCourseResultPreviewDto> studentCourseResults);
    }
}