import { z } from 'zod'

export const sessionSchema = z.object({
  id: z.union([z.string(), z.number()]),
  device_id: z.union([z.string(), z.number()]),
  user_id: z.union([z.string(), z.number()]),
  application_id: z.union([z.string(), z.number()]),
  instance_id: z.string(),
  last_heartbeat: z.string().nullable().optional(),
  created_at: z.string(),
  updated_at: z.string().optional(),
  device_identifier: z.string().optional(),
  device_name: z.string().optional().nullable(),
  username: z.string().optional(),
  app_name: z.string().optional(),
  is_online: z.boolean().optional(),
})

export type Session = z.infer<typeof sessionSchema>
