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

export type Schema = InferSchema<DB>;

export type Item<T extends { Item: object }> = Selectable<T["Item"]>;
export type ItemCreate<T extends { Item: object }> = Insertable<T["Item"]>;
export type ItemUpdate<T extends { Item: object }> = Updateable<T["Item"]>;

export type TaxonomyNode<T extends { TaxonomyNode: object }> = Selectable<T["TaxonomyNode"]>;
export type TaxonomyNodeCreate<T extends { TaxonomyNode: object }> = Insertable<T["TaxonomyNode"]>;
export type TaxonomyNodeUpdate<T extends { TaxonomyNode: object }> = Updateable<T["TaxonomyNode"]>;

export type ItemTaxonomyAssignment<T extends { ItemTaxonomyAssignment: object }> = Selectable<
  T["ItemTaxonomyAssignment"]
>;
export type ItemTaxonomyAssignmentCreate<T extends { ItemTaxonomyAssignment: object }> = Insertable<
  T["ItemTaxonomyAssignment"]
>;
