export type Message = {
  id: string;
  body: string;
  timestamp: number;
  authorId: string;
};

export type BasicUserInfo = {
  id: string;
  name: string;
  lastVisit?: number;
  avatar?: string;
};

export type Conversation = {
  id: string;
  employer: BasicUserInfo;
  employee: BasicUserInfo;
  muted?: {
    [id: string]: boolean;
  }
};

export type ChatRoom = {
  conversationId: string;
  messages: Array<Message>;
};

export type MapOfChatRooms = {
  [id: string]: ChatRoom,
};
