Add services
This commit is contained in:
@@ -1,6 +1,26 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Customer } from '../api/customer';
|
||||
|
||||
export interface Country {
|
||||
name?: string;
|
||||
code?: string;
|
||||
}
|
||||
|
||||
export interface Representative {
|
||||
name?: string;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
export interface Customer {
|
||||
id?: number;
|
||||
name?: string;
|
||||
country?: Country;
|
||||
company?: string;
|
||||
date?: string;
|
||||
status?: string;
|
||||
activity?: number;
|
||||
representative?: Representative;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class CustomerService {
|
||||
@@ -1,6 +1,12 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Image } from '../api/image';
|
||||
|
||||
export interface Image {
|
||||
previewImageSrc?:any;
|
||||
thumbnailImageSrc?:any;
|
||||
alt?:any;
|
||||
title?:any;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class PhotoService {
|
||||
@@ -1,6 +1,23 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Product } from '../api/product';
|
||||
|
||||
interface InventoryStatus {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
id?: string;
|
||||
code?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
price?: number;
|
||||
quantity?: number;
|
||||
inventoryStatus?: InventoryStatus;
|
||||
category?: string;
|
||||
image?: string;
|
||||
rating?: number;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class ProductService {
|
||||
Reference in New Issue
Block a user