import { z } from 'zod';

/**
 * Schema for AttributeDTO
 * Represents attribute data with date fields as strings (ISO format)
 *
 * Note: The API returns start/stop as string (not Date objects).
 * If date parsing is needed, use z.coerce.date() or parse in application logic.
 */
export const AttributeSchema = z.object({
  dataType: z.number().describe('Data type'),
  formatValidator: z.string().describe('Format validator').optional(),
  group: z.string().describe('Group').optional(),
  key: z.string().describe('Key'),
  name: z.string().describe('Name').optional(),
  start: z.string().describe('Start').optional(),
  stop: z.string().describe('Stop').optional(),
  value: z.string().describe('Value').optional(),
});
