init: minimum from lab2

This commit is contained in:
2026-11-01 13:37:02 +03:00
parent 0ab3a341aa
commit b4d1497d1c
66 changed files with 13594 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import { Message } from '../../common/domain';
export interface MessageResponse {
id: string;
chat_id: string;
sender_id: string;
text: string;
created_at: string;
}
export interface MessagePageResponse {
items: MessageResponse[];
next_cursor: string | null;
}
export function toMessageResponse(message: Message): MessageResponse {
return {
id: message.id,
chat_id: message.chatId,
sender_id: message.senderId,
text: message.text,
created_at: message.createdAt,
};
}