1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import {Injectable} from '@angular/core';
- import {ISchema, Resource, Service} from 'ngx-jsonapi';
- @Injectable()
- export class CentersService extends Service<Center> {
- 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;
- }
- }
|