File

src/app/models/brand.ts

Description

Brand model

Implements

Deserializable

Example

Index

Properties
Methods

Constructor

constructor(id: number, name: string, src: string)
Parameters :
Name Type Optional
id number no
name string no
src string no

Properties

id
id: number
Type : number
name
name: string
Type : string
src
src: string
Type : string

Methods

Public deserialize
deserialize(input: any)

Deserialize Brand model

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

/**
 * Brand model
 * @class Brand
 * @implements Deserializable<Brand>
 */
export class Brand implements Deserializable<Brand> {
  id: number;
  name: string;
  src: string;

   /**
   * @constructor
   * @param {id} id
   * @param {name} name
   * @param {src} src
   */
  constructor(id: number, name: string, src: string) {
    this.id = id;
    this.name = name;
    this.src = src;
  }

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

results matching ""

    No results matching ""