forked from mtusi2026/mtusi2026lab6
23 lines
416 B
TypeScript
23 lines
416 B
TypeScript
import { Chat } from '../../common/domain';
|
|
|
|
export interface ChatResponse {
|
|
id: string;
|
|
title: string;
|
|
member_ids: string[];
|
|
created_at: string;
|
|
}
|
|
|
|
export interface ChatPageResponse {
|
|
items: ChatResponse[];
|
|
next_cursor: string | null;
|
|
}
|
|
|
|
export function toChatResponse(chat: Chat): ChatResponse {
|
|
return {
|
|
id: chat.id,
|
|
title: chat.title,
|
|
member_ids: chat.memberIds,
|
|
created_at: chat.createdAt,
|
|
};
|
|
}
|