| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- export type UserRole = 'superadmin' | 'moderator' | 'landlord' | 'executor' | 'customer'
- export type UserStatus = 'active' | 'banned' | 'pending_verification'
- export interface User {
- id: string
- email: string
- role: UserRole
- status: UserStatus
- name?: string
- avatar_url?: string
- phone?: string
- bio?: string
- country?: string
- created_at: string
- }
- export type PlaceType = 'place' | 'studio'
- export type PlaceStatus = 'draft' | 'pending_moderation' | 'published' | 'rejected' | 'archived'
- export interface Coordinates {
- lat: number
- lng: number
- }
- export interface Place {
- id: string
- type: PlaceType
- title: string
- description?: string
- address?: string
- coordinates: Coordinates
- cover_image?: string
- images: string[]
- access_info?: string
- rating: number
- reviews_count: number
- tags: Tag[]
- features: Feature[]
- status: PlaceStatus
- owner: Pick<User, 'id' | 'name' | 'avatar_url'>
- pricing?: {
- hourly_rate: number
- currency: string
- min_hours: number
- }
- booking_url?: string
- executor_services?: ExecutorService[]
- created_at: string
- updated_at?: string
- }
- export interface ExecutorService {
- id: string
- title: string
- price: number
- currency: string
- duration_minutes?: number
- executor_name: string
- }
- export interface Tag {
- id: string
- name: string
- category?: string
- }
- export interface Feature {
- id: string
- name: string
- category?: string
- icon?: string
- }
- export interface Service {
- id: string
- executor_id: string
- title: string
- description?: string
- price: number
- currency: string
- duration_minutes?: number
- tags: Tag[]
- rating: number
- reviews_count: number
- portfolio_images: string[]
- status: 'draft' | 'published' | 'archived'
- created_at: string
- }
- export interface Review {
- id: string
- user: Pick<User, 'id' | 'name' | 'avatar_url'>
- rating: number
- text?: string
- created_at: string
- }
- export interface Booking {
- id: string
- place_id: string
- start_time: string
- end_time: string
- status: 'pending' | 'confirmed' | 'cancelled' | 'completed'
- total_price?: number
- currency: string
- comment?: string
- }
- export interface PaginatedResponse<T> {
- data: T[]
- next_cursor?: string
- has_more: boolean
- }
- export interface ApiError {
- type: string
- title: string
- status: number
- detail: string
- instance?: string
- errors?: { field: string; message: string }[]
- }
|