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 UoMCategory<T extends { UoMCategory: object }> = Selectable<T["UoMCategory"]>;
export type UoMCategoryCreate<T extends { UoMCategory: object }> = Insertable<T["UoMCategory"]>;
export type UoMCategoryUpdate<T extends { UoMCategory: object }> = Updateable<T["UoMCategory"]>;

export type Unit<T extends { Unit: object }> = Selectable<T["Unit"]>;
export type UnitCreate<T extends { Unit: object }> = Insertable<T["Unit"]>;
export type UnitUpdate<T extends { Unit: object }> = Updateable<T["Unit"]>;

export type Currency<T extends { Currency: object }> = Selectable<T["Currency"]>;
export type CurrencyCreate<T extends { Currency: object }> = Insertable<T["Currency"]>;
export type CurrencyUpdate<T extends { Currency: object }> = Updateable<T["Currency"]>;

export type ExchangeRate<T extends { ExchangeRate: object }> = Selectable<T["ExchangeRate"]>;
export type ExchangeRateCreate<T extends { ExchangeRate: object }> = Insertable<T["ExchangeRate"]>;
export type ExchangeRateUpdate<T extends { ExchangeRate: object }> = Updateable<T["ExchangeRate"]>;
