chore: port lab4 solution as lab5 base

This commit is contained in:
2026-11-15 14:42:12 +03:00
parent 276dbdad8a
commit 19dda6e286
90 changed files with 18537 additions and 0 deletions
@@ -0,0 +1,33 @@
import { Attachment } from '@prisma/client';
export interface AttachmentResponse {
id: string;
chat_id: string;
owner_id: string;
filename: string;
content_type: string;
size_bytes: number;
sha256: string;
status: 'ready';
variants: never[];
error_code: null;
created_at: string;
updated_at: string;
}
export function toAttachmentResponse(row: Attachment): AttachmentResponse {
return {
id: row.id,
chat_id: row.chatId,
owner_id: row.ownerId,
filename: row.filename,
content_type: row.contentType,
size_bytes: row.sizeBytes,
sha256: row.sha256,
status: 'ready',
variants: [],
error_code: null,
created_at: row.createdAt.toISOString(),
updated_at: row.updatedAt.toISOString(),
};
}