Uecko_ERP/apps/server/archive/contexts/accounts/domain/services/account-service.interface.ts
2025-05-09 12:45:32 +02:00

21 lines
631 B
TypeScript

import { UniqueID } from "@/core/common/domain";
import { Collection, Result } from "@repo/rdx-utils";
import { Account, IAccountProps } from "../aggregates";
export interface IAccountService {
findAccounts(transaction?: any): Promise<Result<Collection<Account>, Error>>;
findAccountById(accountId: UniqueID, transaction?: any): Promise<Result<Account>>;
updateAccountById(
accountId: UniqueID,
data: Partial<IAccountProps>,
transaction?: any
): Promise<Result<Account, Error>>;
createAccount(
accountId: UniqueID,
data: IAccountProps,
transaction?: any
): Promise<Result<Account, Error>>;
}