import { t } from "@tailor-platform/sdk"; import { defineSchema } from "@tailor-platform/sdk/seed"; import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/test"; import { incomingPayment } from "../../src/modules-db"; const schemaType = t.object({ ...incomingPayment.pickFields(["id"], { optional: true }), ...incomingPayment.omitFields(["id"]), }); export const hook = createTailorDBHook(incomingPayment); export const schema = defineSchema( createStandardSchema(schemaType, hook, incomingPayment), { foreignKeys: [ {"column":"companyId","references":{"table":"Company","column":"id"}}, {"column":"customerAccountId","references":{"table":"CustomerAccount","column":"id"}}, {"column":"currencyId","references":{"table":"Currency","column":"id"}}, {"column":"paymentAccountId","references":{"table":"Account","column":"id"}}, ], } );