Locations added
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import ICalendarEvent from "@/interfaces/ICalendarEvent";
|
||||
|
||||
export interface Permission {
|
||||
resource: string;
|
||||
action: string;
|
||||
@@ -52,7 +54,6 @@ export interface User {
|
||||
email: string;
|
||||
password?: string; // Optional field, since it's omitted in the JSON
|
||||
phone: string;
|
||||
role: Role; // 'admin' or 'user'
|
||||
createdAt: string; // ISO date string
|
||||
updatedAt: string; // ISO date string
|
||||
|
||||
@@ -66,3 +67,39 @@ export interface ApiResponse<T> {
|
||||
message: string;
|
||||
data?: T;
|
||||
}
|
||||
|
||||
export interface Location {
|
||||
id?: number;
|
||||
street: string;
|
||||
city: string;
|
||||
postalCode: string;
|
||||
latitude?: number;
|
||||
longitude?: number;
|
||||
events?: ICalendarEvent[];
|
||||
}
|
||||
|
||||
// types/types.ts
|
||||
export interface OpenStreetMapLocation {
|
||||
place_id: string; // Unique identifier for the location
|
||||
licence: string; // Licensing information
|
||||
osm_type: string; // e.g., "node", "way", "relation"
|
||||
osm_id: string; // OSM-specific ID
|
||||
lat: string; // Latitude
|
||||
lon: string; // Longitude
|
||||
display_name: string; // Human-readable full address
|
||||
address: {
|
||||
house_number?: string; // House number (optional)
|
||||
road?: string; // Street name (optional)
|
||||
neighbourhood?: string; // Neighborhood (optional)
|
||||
suburb?: string; // Suburb (optional)
|
||||
city?: string; // City (optional)
|
||||
town?: string; // Town (fallback for city)
|
||||
village?: string; // Village (fallback for city)
|
||||
county?: string; // County (optional)
|
||||
state?: string; // State or region (optional)
|
||||
postcode?: string; // Postal code (optional)
|
||||
country?: string; // Country (optional)
|
||||
country_code?: string; // ISO country code (e.g., "fr")
|
||||
[key: string]: string | undefined; // Allow for additional fields
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user