Skip to content

fix chat domain model #310

@SOunit

Description

@SOunit
  • message should have user data for presentation layer

ASIS

export type Chat = {
  id: string;
  users: User[];
  messages: Message[];
};

export type Message = {
  id: string;
  userId: string;
  chatId: string;
  text: string;
  createdAt?: string;
};

TOBE

export type Chat = {
  id: string;
  userName: string;
  userImageUrl: string;
  messages: Message[];
};

export type Message = {
  id: string;
  chatId: string;
  userId: string;
  userImageUrl: string;
  text: string;
  createdAt?: string;
};

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions