import { z } from 'zod'

export const announcementStatusSchema = z.enum(['active', 'inactive'])
export const announcementTypeSchema = z.enum(['info', 'warning', 'error', 'success'])

export const announcementSchema = z.object({
  id: z.number(),
  application_id: z.number(),
  application_name: z.string(),
  title: z.string(),
  content: z.string(),
  type: announcementTypeSchema,
  status: announcementStatusSchema,
  is_top: z.boolean(),
  created_at: z.string(),
  updated_at: z.string(),
})

export type Announcement = z.infer<typeof announcementSchema>
