export const response_producto_all = {
  description: 'Productos obtenidos exitosamente',
  schema: {
    type: 'object',
    properties: {
      message: { type: 'string' },
      data: {
        type: 'array',
        items: {
          type: 'object',
          properties: {
            id: { type: 'string', format: 'uuid' },
            empresa_id: { type: 'string', format: 'uuid' },
            categoria_id: { type: 'string', format: 'uuid', nullable: true },
            categoria: {
              type: 'object',
              nullable: true,
              properties: {
                id: { type: 'string', format: 'uuid' },
                empresa_id: { type: 'string', format: 'uuid', nullable: true },
                padre_id: { type: 'string', format: 'uuid', nullable: true },
                descripcion: { type: 'string', nullable: true },
                activo: { type: 'boolean', nullable: true },
                deleted_at: { type: 'boolean', nullable: true },
                created_at: { type: 'string', format: 'date-time', nullable: true },
                updated_at: { type: 'string', format: 'date-time', nullable: true },
                usuario: { type: 'string', nullable: true },
              },
            },
            afectacion_iva: {
              type: 'object',
              properties: {
                id: { type: 'string' },
                codigo: { type: 'number' },
                descripcion: { type: 'string' },
                created_at: { type: 'string', format: 'date-time' },
                updated_at: { type: 'string', format: 'date-time' },
              },
            },
            unidades_de_medida: {
              type: 'object',
              properties: {
                id: { type: 'string' },
                codigo: { type: 'number' },
                descripcion: { type: 'string' },
                created_at: { type: 'string', format: 'date-time' },
                updated_at: { type: 'string', format: 'date-time' },
              },
            },
            descripcion: { type: 'string' },
            precio: { type: 'number' },
            cod_producto: { type: 'string', nullable: true },
            porcentaje_iva: { type: 'number' },
            proporcion_iva: { type: 'number' },
            codigo_barra: { type: 'string', nullable: true },
            tipo: { type: 'string', nullable: true },
            ddncpg: { type: 'string', nullable: true },
            ddncpe: { type: 'string', nullable: true },
            codigo_barra_paquete: { type: 'string', nullable: true },
            active: { type: 'boolean' },
            deleted: { type: 'boolean' },
            deleted_at: { type: 'string', format: 'date-time', nullable: true },
            created_at: { type: 'string', format: 'date-time' },
            updated_at: { type: 'string', format: 'date-time' },
            usuario: { type: 'string', nullable: true },
            url: {
              type: 'string',
              nullable: true,
              example:
                'https://smart-voice-bucket.sfo3.digitaloceanspaces.com/productos/96585bc5-4a4a-496c-9ceb-944199022d8e/126dd638-3374-463f-81ee-08ca3874ec28.webp',
            },
          },
        },
      },
      total: { type: 'number' },
      page: { type: 'number' },
      limit: { type: 'number' },
      lastPage: { type: 'number' },
    },
  },
};
export const response_producto_find = {
  description: 'Producto encontrado exitosamente',
  schema: {
    type: 'object',
    properties: {
      message: { type: 'string', example: 'Producto encontrado exitosamente' },
      data: {
        type: 'object',
        properties: {
          id: { type: 'string', format: 'uuid' },
          empresa_id: { type: 'string', format: 'uuid' },
          categoria_id: { type: 'string', format: 'uuid', nullable: true },
          categoria: {
            type: 'object',
            nullable: true,
            properties: {
              id: { type: 'string', format: 'uuid' },
              empresa_id: { type: 'string', format: 'uuid', nullable: true },
              padre_id: { type: 'string', format: 'uuid', nullable: true },
              descripcion: { type: 'string', nullable: true },
              activo: { type: 'boolean', nullable: true },
              deleted_at: { type: 'boolean', nullable: true },
              created_at: { type: 'string', format: 'date-time', nullable: true },
              updated_at: { type: 'string', format: 'date-time', nullable: true },
              usuario: { type: 'string', nullable: true },
            },
          },
          afectacion_iva: {
            type: 'object',
            properties: {
              id: { type: 'string' },
              codigo: { type: 'number' },
              descripcion: { type: 'string' },
              created_at: { type: 'string', format: 'date-time' },
              updated_at: { type: 'string', format: 'date-time' },
            },
          },
          unidades_de_medida: {
            type: 'object',
            properties: {
              id: { type: 'string' },
              codigo: { type: 'number' },
              descripcion: { type: 'string' },
              created_at: { type: 'string', format: 'date-time' },
              updated_at: { type: 'string', format: 'date-time' },
            },
          },
          descripcion: { type: 'string' },
          precio: { type: 'number' },
          cod_producto: { type: 'string', nullable: true },
          porcentaje_iva: { type: 'number' },
          proporcion_iva: { type: 'number' },
          codigo_barra: { type: 'string', nullable: true },
          tipo: { type: 'string', nullable: true },
          ddncpg: { type: 'string', nullable: true },
          ddncpe: { type: 'string', nullable: true },
          codigo_barra_paquete: { type: 'string', nullable: true },
          active: { type: 'boolean' },
          created_at: { type: 'string', format: 'date-time' },
          updated_at: { type: 'string', format: 'date-time' },
          url: {
            type: 'string',
            nullable: true,
            example:
              'https://smart-voice-bucket.sfo3.digitaloceanspaces.com/productos/96585bc5-4a4a-496c-9ceb-944199022d8e/126dd638-3374-463f-81ee-08ca3874ec28.webp',
          },
        },
      },
    },
  },
};
export const response_producto_standard = {
  description: 'Producto creado/actualizado exitosamente',
  schema: {
    type: 'object',
    properties: {
      message: { type: 'string', example: 'Producto creado exitosamente' },
      data: {
        type: 'object',
        properties: {
          id: { type: 'string', format: 'uuid' },
          empresa_id: { type: 'string', format: 'uuid' },
          categoria_id: { type: 'string', format: 'uuid', nullable: true },
          afectacion_id: { type: 'string', format: 'uuid' },
          unidad_medida_id: { type: 'string', format: 'uuid' },
          descripcion: { type: 'string' },
          precio: { type: 'number' },
          cod_producto: { type: 'string' },
          porcentaje_iva: { type: 'number' },
          proporcion_iva: { type: 'number' },
          codigo_barra: { type: 'string' },
          tipo: { type: 'string' },
          ddncpg: { type: 'string' },
          ddncpe: { type: 'string' },
          codigo_barra_paquete: { type: 'string' },
          active: { type: 'boolean' },
          deleted: { type: 'boolean' },
          deleted_at: { type: 'string', format: 'date-time', nullable: true },
          created_at: { type: 'string', format: 'date-time' },
          updated_at: { type: 'string', format: 'date-time' },
          usuario: { type: 'string', nullable: true },
        },
      },
    },
  },
};

export const response_producto_imagen = {
  description: 'Imagen registrada exitosamente',
  schema: {
    type: 'object',
    properties: {
      message: { type: 'string', example: 'Imagen registrada exitosamente' },
      data: {
        type: 'object',
        properties: {
          id: { type: 'string', format: 'uuid', example: 'f54c16a5-94a0-4b26-9b66-000fa7445ddc' },
          producto_id: { type: 'string', format: 'uuid', example: '96585bc5-4a4a-496c-9ceb-944199022d8e' },
          nombre: { type: 'string', example: 'imagen1.png' },
          path: {
            type: 'string',
            example: 'productos/96585bc5-4a4a-496c-9ceb-944199022d8e/126dd638-3374-463f-81ee-08ca3874ec28.webp',
          },
          extension: { type: 'string', example: 'webp' },
          tamanho_kb: { type: 'string', example: '18' },
          orden: { type: 'number', nullable: true, example: null },
          es_principal: { type: 'boolean', example: false },
          active: { type: 'boolean', example: true },
          created_at: { type: 'string', format: 'date-time' },
          updated_at: { type: 'string', format: 'date-time' },
          usuario: { type: 'string', nullable: true, example: null },
          url: {
            type: 'string',
            example:
              'https://smart-voice-bucket.sfo3.digitaloceanspaces.com/productos/96585bc5-4a4a-496c-9ceb-944199022d8e/126dd638-3374-463f-81ee-08ca3874ec28.webp',
          },
        },
      },
    },
  },
};
