import { z } from 'zod';
import { EntitySchema } from '@isa/common/data-access';

export const FileSchema = EntitySchema.extend({
  name: z.string().describe('Name').optional(),
  type: z.string().describe('Type').optional(),
  path: z.string().describe('Path').optional(),
  mime: z.string().describe('Mime').optional(),
  hash: z.string().describe('Whether has h').optional(),
  size: z.number().describe('Size').optional(),
  subtitle: z.string().describe('Subtitle').optional(),
  copyright: z.string().describe('Copyright').optional(),
  locale: z.string().describe('Locale').optional(),
  license: z.string().describe('License').optional(),
  sort: z.number().int().describe('Sort criteria').optional(),
});

export type File = z.infer<typeof FileSchema>;
