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