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