import {Injectable} from '@angular/core';
import {ISchema, Resource, Service} from 'ngx-jsonapi';
@Injectable()
export class CentersService extends Service
{
public resource = Center;
public type = 'centers';
}
export class Center extends Resource {
public attributes: {
lat: string,
lng: string,
address: string,
department: string,
};
get lat(): string {
return this.attributes.lat;
}
set lat(lat: string) {
this.attributes.lat = lat;
}
get lng(): string {
return this.attributes.lng;
}
set lng(lng: string) {
this.attributes.lng = lng;
}
get address(): string {
return this.attributes.address;
}
set address(address: string) {
this.attributes.address = address;
}
get department(): string {
return this.attributes.department;
}
set department(department: string) {
this.attributes.department = department;
}
}