import { t } from "@tailor-platform/sdk"; import { defineSchema } from "@tailor-platform/sdk/seed"; import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/test"; import { account } from "../../src/modules-db"; const schemaType = t.object({ ...account.pickFields(["id"], { optional: true }), ...account.omitFields(["id"]), }); export const hook = createTailorDBHook(account); export const schema = defineSchema( createStandardSchema(schemaType, hook, account), { foreignKeys: [ {"column":"companyId","references":{"table":"Company","column":"id"}}, ], indexes: [ {"name":"account_company_code_unique_idx","columns":["companyId","code"],"unique":true}, ], } );