import type { StorageType, ResourceData, CreateResourceData } from '../types';

// 数据库适配器接口 - 基于 operations.ts 中的函数
export interface DatabaseAdapter {
	getResourceByFileId(fileId: string): Promise<{ status: string; resource?: ResourceData }>;
	deleteResource(id: string): Promise<ResourceData>;
	deleteFailedUploadingResource(expirationPeriod: number): Promise<{ count: number }>;
	updateResource(id: string, data: any): Promise<ResourceData>;
	migrateResourcesStorageType(
		fromStorageType: StorageType,
		toStorageType: StorageType,
	): Promise<{ count: number }>;
	createResource(data: CreateResourceData): Promise<ResourceData>;
	updateResourceStatus(fileId: string, status: string, additionalData?: any): Promise<ResourceData>;
} 