Add services

This commit is contained in:
Çetin
2025-01-03 12:05:07 +03:00
parent fc8f5eceee
commit d7bb01ce99
7 changed files with 46 additions and 3 deletions

View File

@@ -1,6 +1,26 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; 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() @Injectable()
export class CustomerService { export class CustomerService {

View File

@@ -1,6 +1,12 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Image } from '../api/image';
export interface Image {
previewImageSrc?:any;
thumbnailImageSrc?:any;
alt?:any;
title?:any;
}
@Injectable() @Injectable()
export class PhotoService { export class PhotoService {

View File

@@ -1,6 +1,23 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; 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() @Injectable()
export class ProductService { export class ProductService {