import type { DB } from "../generated/kysely-tailordb";
import type {
  InferSchema,
  Selectable,
  Insertable,
  Updateable,
} from "@tailor-platform/erp-kit/module";

export type Schema = InferSchema<DB>;

export type ChartOfAccounts<T extends { ChartOfAccounts: object }> = Selectable<
  T["ChartOfAccounts"]
>;
export type ChartOfAccountsCreate<T extends { ChartOfAccounts: object }> = Insertable<
  T["ChartOfAccounts"]
>;
export type ChartOfAccountsUpdate<T extends { ChartOfAccounts: object }> = Updateable<
  T["ChartOfAccounts"]
>;

export type AccountGroup<T extends { AccountGroup: object }> = Selectable<T["AccountGroup"]>;
export type AccountGroupCreate<T extends { AccountGroup: object }> = Insertable<T["AccountGroup"]>;
export type AccountGroupUpdate<T extends { AccountGroup: object }> = Updateable<T["AccountGroup"]>;

export type Account<T extends { Account: object }> = Selectable<T["Account"]>;
export type AccountCreate<T extends { Account: object }> = Insertable<T["Account"]>;
export type AccountUpdate<T extends { Account: object }> = Updateable<T["Account"]>;
