import { t } from "@tailor-platform/sdk"; import { defineSchema } from "@tailor-platform/sdk/seed"; import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/test"; import { stockAdjustmentLine } from "../../src/modules-db"; const schemaType = t.object({ ...stockAdjustmentLine.pickFields(["id"], { optional: true }), ...stockAdjustmentLine.omitFields(["id"]), }); export const hook = createTailorDBHook(stockAdjustmentLine); export const schema = defineSchema( createStandardSchema(schemaType, hook, stockAdjustmentLine), { foreignKeys: [ {"column":"stockAdjustmentId","references":{"table":"StockAdjustment","column":"id"}}, {"column":"itemId","references":{"table":"Item","column":"id"}}, {"column":"storageLocationId","references":{"table":"StorageLocation","column":"id"}}, ], } );