import { objectId } from '@jig-software/zod-bson';
import { z } from 'zod';

export const ReportIntention = z.object({
  reportType: z.string(),
  metadata: z.object({
    year: z.number().int(),
    month: z.number().int(),
  }),
});

export type ReportIntention = z.infer<typeof ReportIntention>;

export const ReportFile = z.object({
  _id: objectId(),
  fid: objectId().optional(),
  filename: z.string(),
  reportType: z.string(),
  metadata: z.record(z.unknown()),
  createdAt: z.date(),
});

export type ReportFile = z.infer<typeof ReportFile>;
