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

21 lines
637 B
TypeScript
Raw Normal View History

2025-05-02 21:43:51 +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>>;
}