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

// Note: AppSettings is for Dynamic props.

export const AppSettings = z.object({
  _id: objectId(),
  // Include other properties here.
  llmInMaintenance: z.boolean().optional(),
  leaveBalanceUpdateCronPattern: z.string().optional(),
  attendanceTakeAMCronPattern: z.string().optional(),
  attendanceTakePMCronPattern: z.string().optional(),
  leaveRemindCronPattern: z.string().optional(),
  leaveApplicationRemindCronPattern: z.string().optional(),
  attendanceReportCronPattern: z.string().optional(),
  fetchHolidaysCronPattern: z.string().optional(),
  createdAt: z.date(),
  updatedAt: z.date(),
});

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

export const AppSettingsInit = AppSettings.omit({
  _id: true,
  createdAt: true,
  updatedAt: true,
});

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