Uecko_ERP/apps/server/archive/contexts/accounts/domain/services/account-service.interface.ts
2025-05-04 22:06:57 +02:00

21 lines
637 B
TypeScript

import { UniqueID } from "@/core/common/domain";
import { Collection, Result } from "@/core/common/helpers";
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>>;
}