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

export type Schema = InferSchema<DB>;

export type AccountPayableDocument<T extends { AccountPayableDocument: object }> = Selectable<
  T["AccountPayableDocument"]
>;
export type AccountPayableDocumentCreate<T extends { AccountPayableDocument: object }> = Insertable<
  T["AccountPayableDocument"]
>;
export type AccountPayableDocumentUpdate<T extends { AccountPayableDocument: object }> = Updateable<
  T["AccountPayableDocument"]
>;

export type AccountPayableDocumentLine<T extends { AccountPayableDocumentLine: object }> =
  Selectable<T["AccountPayableDocumentLine"]>;
export type AccountPayableDocumentLineCreate<T extends { AccountPayableDocumentLine: object }> =
  Insertable<T["AccountPayableDocumentLine"]>;
export type AccountPayableDocumentLineUpdate<T extends { AccountPayableDocumentLine: object }> =
  Updateable<T["AccountPayableDocumentLine"]>;

export type AccountPayableDistributionLine<T extends { AccountPayableDistributionLine: object }> =
  Selectable<T["AccountPayableDistributionLine"]>;
export type AccountPayableDistributionLineCreate<
  T extends { AccountPayableDistributionLine: object },
> = Insertable<T["AccountPayableDistributionLine"]>;
export type AccountPayableDistributionLineUpdate<
  T extends { AccountPayableDistributionLine: object },
> = Updateable<T["AccountPayableDistributionLine"]>;

export type AccountPayableDueScheduleLine<T extends { AccountPayableDueScheduleLine: object }> =
  Selectable<T["AccountPayableDueScheduleLine"]>;
export type AccountPayableDueScheduleLineCreate<
  T extends { AccountPayableDueScheduleLine: object },
> = Insertable<T["AccountPayableDueScheduleLine"]>;
export type AccountPayableDueScheduleLineUpdate<
  T extends { AccountPayableDueScheduleLine: object },
> = Updateable<T["AccountPayableDueScheduleLine"]>;

export type InvoiceToleranceConfig<T extends { InvoiceToleranceConfig: object }> = Selectable<
  T["InvoiceToleranceConfig"]
>;
export type InvoiceToleranceConfigCreate<T extends { InvoiceToleranceConfig: object }> = Insertable<
  T["InvoiceToleranceConfig"]
>;
export type InvoiceToleranceConfigUpdate<T extends { InvoiceToleranceConfig: object }> = Updateable<
  T["InvoiceToleranceConfig"]
>;
