26 lines
1018 B
C#
26 lines
1018 B
C#
namespace Shared.Contracts.Account;
|
|
|
|
/// <summary>
|
|
/// Contract Interface برای دسترسی به اطلاعات پایه کاربران از سایر ماژولها
|
|
/// این Interface به عنوان ACL (Anti-Corruption Layer) عمل میکند
|
|
///
|
|
/// مزایا:
|
|
/// - هیچ وابستگی به Implementation ندارد
|
|
/// - ماژولهای دیگر فقط به این Contract دسترسی دارند
|
|
/// - امکان تبدیل به Microservice بدون Breaking Change
|
|
/// - Testability بالا (Mock کردن آسان)
|
|
/// </summary>
|
|
public interface IAccountQueryService
|
|
{
|
|
/// <summary>
|
|
/// دریافت اطلاعات پایه یک کاربر
|
|
/// </summary>
|
|
Task<AccountBasicDto> GetAccountAsync(long accountId);
|
|
|
|
/// <summary>
|
|
/// دریافت اطلاعات پایه لیستی از کاربران (Batch Query برای جلوگیری از N+1)
|
|
/// </summary>
|
|
Task<List<AccountBasicDto>> GetProgramManagerAccountListAsync(List<long> accountIds);
|
|
}
|
|
|