import { t } from "@tailor-platform/sdk"; import { defineSchema } from "@tailor-platform/sdk/seed"; import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/test"; import { costLayerConsumption } from "../../src/modules-db"; const schemaType = t.object({ ...costLayerConsumption.pickFields(["id"], { optional: true }), ...costLayerConsumption.omitFields(["id"]), }); export const hook = createTailorDBHook(costLayerConsumption); export const schema = defineSchema( createStandardSchema(schemaType, hook, costLayerConsumption), { foreignKeys: [ {"column":"costLayerId","references":{"table":"CostLayer","column":"id"}}, {"column":"ledgerEntryId","references":{"table":"InventoryLedger","column":"id"}}, ], } );