import {Injectable} from '@angular/core';
import {ICollection, ISchema, Resource} from 'ngx-jsonapi';
import {Service as Srv} from 'ngx-jsonapi';
import {Base} from 'ngx-jsonapi/services/base';
import {Type, TypesService} from './type.service';


@Injectable()
export class ServicesService extends Srv<Service> {
  public resource = Service;
  public type = 'services';
}

export class Service extends Resource {
  public attributes: {
    id: string,
    name: string,
    price: number,
  };

  public getId() {
    return this.attributes.id;
  }

  public setId(id: string) {
    return this.attributes.id = id;
  }

  public getName() {
    return this.attributes.name;
  }
  public setName(name: string) {
    return this.attributes.name = name;
  }

  public getPrice() {
    return this.attributes.price;
  }

  public setPrice(price: number) {
    return this.attributes.price = price;
  }


}
