import { z } from 'zod'

export const createWorkProcessSchema = z.object({
  type: z.enum([
    'HIRE', 'ONBOARD', 'CUSTOM_CONTRACT', 'INFO_SUBMIT', 'CONFIRM',
    'CHANGE', 'RENEW', 'SUSPEND', 'INCOME_CERT', 'TERMINATE',
    'RESCIND', 'LEAVING_CERT', 'FLEXIBLE',
  ]),
  title: z.string().max(100).optional(),
  employeeId: z.string().optional().nullable(),
  formData: z.record(z.any()).optional(),
  status: z.enum(['DRAFT', 'COMPLETED']).default('DRAFT'),
  remark: z.string().max(500).optional().nullable(),
})

export const updateWorkProcessSchema = z.object({
  title: z.string().max(100).optional(),
  employeeId: z.string().optional().nullable(),
  formData: z.record(z.any()).optional(),
  remark: z.string().max(500).optional().nullable(),
})
