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

export const Attendance = z.object({
  _id: objectId(),
  staff: objectId(),
  workDay: WorkDay,
  skipped: z.boolean().optional(),
  wfh: z.boolean().optional(),
  createdAt: z.date(),
  updatedAt: z.date(),
});

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