import { t } from "@tailor-platform/sdk";
import { defineSchema } from "@tailor-platform/sdk/seed";
import { createTailorDBHook, createStandardSchema } from "@tailor-platform/sdk/test";
import { auditPolicy } from "../../src/modules-db";

const schemaType = t.object({
  ...auditPolicy.pickFields(["id","createdAt"], { optional: true }),
  ...auditPolicy.omitFields(["id","createdAt"]),
});

const hook = createTailorDBHook(auditPolicy);

export const schema = defineSchema(
  createStandardSchema(schemaType, hook),
);
