Uecko_ERP/apps/server/src/contexts/accounts/domain/services/account-service.interface.ts

21 lines
633 B
TypeScript
Raw Normal View History

2025-04-22 15:09:57 +00:00
import { UniqueID } from "core/common/domain";
import { Collection, Result } from "core/common/helpers";
2025-03-04 17:08:33 +00:00
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>>;
}