fitst commit
This commit is contained in:
124
types/data.ts
Normal file
124
types/data.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
import { City, Company, Country, Product, State } from '@/types';
|
||||
|
||||
export const products: Product[] = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Product A',
|
||||
description: 'High quality product',
|
||||
category: 'Electronics',
|
||||
price: 299,
|
||||
company_id: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'Product B',
|
||||
description: 'Premium service',
|
||||
category: 'Services',
|
||||
price: 499,
|
||||
company_id: 2,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'Product C',
|
||||
description: 'Innovative solution',
|
||||
category: 'Software',
|
||||
price: 199,
|
||||
company_id: 1,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: 'Product D',
|
||||
description: 'Best in class',
|
||||
category: 'Hardware',
|
||||
price: 599,
|
||||
company_id: 3,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: 'Product E',
|
||||
description: 'Professional tool',
|
||||
category: 'Tools',
|
||||
price: 149,
|
||||
company_id: 2,
|
||||
},
|
||||
];
|
||||
|
||||
export const companies: Company[] = [
|
||||
{
|
||||
id: 1,
|
||||
company_name: 'Tech Corp',
|
||||
description: 'Leading technology company',
|
||||
country: 'US',
|
||||
industry: 'Technology',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
company_name: 'Service Inc',
|
||||
description: 'Professional services provider',
|
||||
country: 'UK',
|
||||
industry: 'Services',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
company_name: 'Manufacturing Ltd',
|
||||
description: 'Quality manufacturing',
|
||||
country: 'DE',
|
||||
industry: 'Manufacturing',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
company_name: 'Digital Agency',
|
||||
description: 'Creative digital solutions',
|
||||
country: 'FR',
|
||||
industry: 'Marketing',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
company_name: 'Global Trading',
|
||||
description: 'International trade',
|
||||
country: 'CN',
|
||||
industry: 'Trade',
|
||||
},
|
||||
];
|
||||
|
||||
export const countries: Country[] = [
|
||||
{ iso: 'US', name: 'United States', id: 1 },
|
||||
{ iso: 'UK', name: 'United Kingdom', id: 2 },
|
||||
{ iso: 'DE', name: 'Germany', id: 3 },
|
||||
{ iso: 'FR', name: 'France', id: 4 },
|
||||
{ iso: 'CN', name: 'China', id: 5 },
|
||||
{ iso: 'JP', name: 'Japan', id: 6 },
|
||||
{ iso: 'UZ', name: 'Uzbekistan', id: 7 },
|
||||
];
|
||||
|
||||
export const states: State[] = [
|
||||
{ iso: 'CA', name: 'California', country_iso: 'US' },
|
||||
{ iso: 'NY', name: 'New York', country_iso: 'US' },
|
||||
{ iso: 'TX', name: 'Texas', country_iso: 'US' },
|
||||
{ iso: 'ENG', name: 'England', country_iso: 'UK' },
|
||||
{ iso: 'SCT', name: 'Scotland', country_iso: 'UK' },
|
||||
{ iso: 'TAS', name: 'Tashkent Region', country_iso: 'UZ' },
|
||||
{ iso: 'SAM', name: 'Samarkand Region', country_iso: 'UZ' },
|
||||
];
|
||||
|
||||
export const cities: City[] = [
|
||||
{ iso: 'LA', name: 'Los Angeles', state_iso: 'CA' },
|
||||
{ iso: 'SF', name: 'San Francisco', state_iso: 'CA' },
|
||||
{ iso: 'NYC', name: 'New York City', state_iso: 'NY' },
|
||||
{ iso: 'LON', name: 'London', state_iso: 'ENG' },
|
||||
{ iso: 'TAS_CITY', name: 'Tashkent', state_iso: 'TAS' },
|
||||
{ iso: 'SAM_CITY', name: 'Samarkand', state_iso: 'SAM' },
|
||||
];
|
||||
|
||||
export const industries = [
|
||||
'Technology',
|
||||
'Services',
|
||||
'Manufacturing',
|
||||
'Marketing',
|
||||
'Trade',
|
||||
'Finance',
|
||||
'Healthcare',
|
||||
'Education',
|
||||
'Retail',
|
||||
'Agriculture',
|
||||
];
|
||||
44
types/index.ts
Normal file
44
types/index.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
export type TabKey = 'products' | 'companies' | 'countries';
|
||||
|
||||
export interface Product {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string;
|
||||
category: string;
|
||||
price?: number;
|
||||
company_id?: number;
|
||||
}
|
||||
|
||||
export interface Company {
|
||||
id: number;
|
||||
company_name: string;
|
||||
description?: string;
|
||||
country?: string;
|
||||
industry?: string;
|
||||
products?: Product[];
|
||||
}
|
||||
|
||||
export interface Country {
|
||||
iso: string;
|
||||
name: string;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface State {
|
||||
iso: string;
|
||||
name: string;
|
||||
country_iso: string;
|
||||
}
|
||||
|
||||
export interface City {
|
||||
iso: string;
|
||||
name: string;
|
||||
state_iso: string;
|
||||
}
|
||||
|
||||
export interface FilterData {
|
||||
country: { name: string; iso: string };
|
||||
state: { name: string; iso: string };
|
||||
city: { name: string; iso: string };
|
||||
industries: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user