Mero
Tables (9)
Diary
- id — Primary key — NOT NULL
- user_id — Foreign key → Trip.id — NOT NULL
- trip_id — Foreign key → Trip.user_id — NOT NULL
- title
- content
- date
- time
- latitude
- longitude
- location_name
- weather_info
- is_synced
- deleted_at
- version
- last_modified_at
- created_at
- updated_at
ExchangeRate
- id — Primary key — NOT NULL
- from_currency
- to_currency
- rate
- date
- is_manual
- source
- created_at
- updated_at
Expense
- id — Primary key — NOT NULL
- user_id — Foreign key → Trip.id — NOT NULL
- trip_id — Foreign key → Trip.user_id — NOT NULL
- diary_id — Foreign key → Diary.trip_id — NOT NULL
- category_id
- date
- amount
- original_currency
- converted_amount
- exchange_rate
- receipt_url
- memo
- is_synced
- created_at
- updated_at
ExpenseCategory
- id — Primary key — NOT NULL
- user_id — Foreign key → Users.id — NOT NULL
- name
- icon
- color
- is_default
- display_order
- created_at
Photo
- id — Primary key — NOT NULL
- diary_id — Foreign key → Diary.id — NOT NULL
- image_url
- file_name
- mime_type
- width
- height
- order_index
- upload_status
- is_synced
- created_at
RefreshToken
- id — Primary key — NOT NULL
- user_id — Foreign key → Users.id — NOT NULL
- token
- expires_at
- created_at
Sync_Log
- id — Primary key — NOT NULL
- user_id — Foreign key → Users.id — NOT NULL
- table_name
- record_id
- action
- sync_status
- error_message
- created_at
- synced_at
Trip
- id — Primary key — NOT NULL
- user_id — Foreign key → Users.id — NOT NULL
- title
- description
- start_date
- end_date
- countries
- cover_image_url
- total_budget
- budget_currency
- default_currency
- created_at
- updated_at
Users
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255)
- nickname (name) — VARCHAR(255)
- password_hash — VARCHAR(255)
- profile_image_url — VARCHAR(500)
- default_currency' (default_currency) — VARCHAR(3)
- timezone — VARCHAR(50)
- last_login_at — VARCHAR(500)
- created_at — TIMESTAMP
- updated_at — TIMESTAMP