diff --git a/frontend-mobile/types/index.ts b/frontend-mobile/types/index.ts new file mode 100644 index 0000000..9a119e7 --- /dev/null +++ b/frontend-mobile/types/index.ts @@ -0,0 +1,51 @@ +export interface Medicine { + nregistro: string; + nombre: string; + principioActivo: string; + laboratorio: string; + formaFarmaceutica: string; + precio: number | null; + stock: number; + disponibilidad: 'disponible' | 'sin_stock' | 'bajo_stock'; +} + +export interface Pharmacy { + id: number; + name: string; + address: string; + phone: string; + latitude: number; + longitude: number; +} + +export interface PharmacyMedicine { + id: number; + pharmacy_id: number; + medicine_nregistro: string; + medicine_name: string; + price: number; + stock: number; + pharmacy?: Pharmacy; +} + +export interface User { + id: number; + username: string; + is_admin: boolean; +} + +export interface AuthResponse { + user: User; + token: string; +} + +export interface SearchResponse { + medicines: Medicine[]; + total: number; +} + +export interface ApiResponse { + data: T; + success: boolean; + error?: string; +} \ No newline at end of file