import {Injectable} from '@angular/core';
import {Resource, Service} from 'ngx-jsonapi';


@Injectable()
export class TypesService extends Service<Type> {
  public resource = Type;
  public type = 'types';
}


export class Type extends Resource {
  public attributes: {
    name: string;
  };

  get name():string {
    return this.attributes.name;
  }

  set name(name: string) {
    this.attributes.name = name;
  }

}
