File

src/models/message.ts

Index

Properties

Constructor

constructor(data: any)
Parameters :
Name Type Optional Description
data any

Properties

Public author
author: User
Type : User
Public content
content: string
Type : string
Public date
date: string
Type : string
Public destination
destination: User
Type : User
Public title
title: string
Type : string
import { User } from './user';

export class Message {
  public content: string;
  public title: string;
  public author: User;
  public destination: User;
  public date: string;

  public constructor(data: any = {}) {
    this.content = data.content || '';
    this.title = data.title || '';
    this.author = data.author || null;
    this.destination = data.destination || null;
    this.date = data.date || Date.now();
  }
}

results matching ""

    No results matching ""