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

export type Site<T extends { Site: object }> = Selectable<T["Site"]>;
export type SiteCreate<T extends { Site: object }> = Insertable<T["Site"]>;
export type SiteUpdate<T extends { Site: object }> = Updateable<T["Site"]>;

export type Department<T extends { Department: object }> = Selectable<T["Department"]>;
export type DepartmentCreate<T extends { Department: object }> = Insertable<T["Department"]>;
export type DepartmentUpdate<T extends { Department: object }> = Updateable<T["Department"]>;
