Skip to content

Commit

Permalink
Step 2.9: Create models file with declarations of Chat, Message and M…
Browse files Browse the repository at this point in the history
…essageType
  • Loading branch information
dotansimha authored and darkbasic committed Oct 16, 2017
1 parent 64aa460 commit 79e50d5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/models.ts
@@ -0,0 +1,18 @@
export enum MessageType {
TEXT = <any>'text'
}

export interface Chat {
_id?: string;
title?: string;
picture?: string;
lastMessage?: Message;
}

export interface Message {
_id?: string;
chatId?: string;
content?: string;
createdAt?: Date;
type?: MessageType
}

0 comments on commit 79e50d5

Please sign in to comment.