import { UniqueID } from "@repo/rdx-ddd";
import { Result, Collection } from "@repo/rdx-utils";
import { Criteria } from "@repo/rdx-criteria/server";
import {
{
  pascalCase;
  name;
}
} from "../aggregates"

export interface I{{pascalCase name}
}Repository
{
  save(entity: {{pascalCase name}}, transaction: unknown)
  : Promise<Result<
  pascalCase;
  name;
  , Error>>
  existsById(id: UniqueID, transaction?: unknown)
  : Promise<Result<boolean, Error>>
  getById(id: UniqueID, transaction?: unknown)
  : Promise<Result<
  pascalCase;
  name;
  , Error>>
  findByCriteria(criteria: Criteria, transaction?: unknown)
  : Promise<Result<Collection<
  pascalCase;
  name;
  >, Error>>
  deleteById(id: UniqueID, transaction: unknown)
  : Promise<Result<void, Error>>
}
