File

src/app/models/qbox.ts

Description

Color model

Implements

Deserializable

Example

Index

Properties
Methods

Constructor

constructor(id: number, header: string, text: string, author: string, post: string, rating: number)
Parameters :
Name Type Optional
id number no
header string no
text string no
author string no
post string no
rating number no

Properties

author
author: string
Type : string
header
header: string
Type : string
id
id: number
Type : number
post
post: string
Type : string
rating
rating: number
Type : number
text
text: string
Type : string

Methods

Public deserialize
deserialize(input: any)

Deserialize Qbox model

Parameters :
Name Type Optional
input any no
Returns : Qbox
import {Deserializable} from '../deserializable';

/**
 * Color model
 * @class Qbox
 * @implements Deserializable<Qbox>
 */
export class Qbox implements Deserializable<Qbox> {
  id: number;
  header: string;
  text: string;
  author: string;
  post: string;
  rating: number;

  /**
   * @constructor
   * @param {id} id
   * @param {header} header
   * @param {text} text
   * @param {author} author
   * @param {post} post
   * @param {rating} rating
   */
  constructor(id: number, header: string, text: string, author: string, post: string, rating: number) {
    this.id = id;
    this.header = header;
    this.text = text;
    this.author = author;
    this.post = post;
    this.rating = rating;
  }

  /**
   * Deserialize Qbox model
   * @param {input} any
   * @returns {this}
   */
  public deserialize(input: any): Qbox {
    Object.assign(this, input);
    return this;
  }
}

results matching ""

    No results matching ""