Add new frontend - fix 19
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
// src/api/services/DataService.ts
|
||||
import { apiClient } from '../base/apiClient';
|
||||
import {
|
||||
ApiResponse,
|
||||
SalesRecord,
|
||||
CreateSalesRequest,
|
||||
WeatherData,
|
||||
TrafficData,
|
||||
ApiResponse
|
||||
} from '../types/api';
|
||||
|
||||
export interface DashboardStats {
|
||||
@@ -33,6 +29,38 @@ export interface DataValidation {
|
||||
duplicates: number;
|
||||
}
|
||||
|
||||
// Data types
|
||||
export interface WeatherData {
|
||||
date: string;
|
||||
temperature: number;
|
||||
humidity: number;
|
||||
precipitation: number;
|
||||
wind_speed: number;
|
||||
}
|
||||
|
||||
export interface TrafficData {
|
||||
date: string;
|
||||
traffic_volume: number;
|
||||
pedestrian_count: number;
|
||||
}
|
||||
|
||||
export interface SalesRecord {
|
||||
id: string;
|
||||
tenant_id: string;
|
||||
product_name: string;
|
||||
quantity_sold: number;
|
||||
revenue: number;
|
||||
date: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface CreateSalesRequest {
|
||||
product_name: string;
|
||||
quantity_sold: number;
|
||||
revenue: number;
|
||||
date: string;
|
||||
}
|
||||
|
||||
export class DataService {
|
||||
/**
|
||||
* Upload sales history file
|
||||
|
||||
Reference in New Issue
Block a user