RideOn DB

Tables (20)

bike_rental_station

  • id — BIGSERIAL — Primary key
  • rental_station_name — VARCHAR(255) — NOT NULL
  • rental_station_type — VARCHAR(100)
  • address_street — TEXT
  • address_jibun — TEXT
  • latitude — NUMERIC(10,7)
  • longitude — NUMERIC(10,7)
  • operation_start_time — TIMESTAMP
  • operation_end_time — TIMESTAMP
  • closed_days — TIMESTAMP
  • fee_type — VARCHAR(50)
  • rental_fee — TEXT
  • bicycle_count — INT
  • parking_spots — INT
  • air_pump_available — BOOLEAN
  • air_pump_type — VARCHAR(100)
  • repair_station_available — BOOLEAN
  • management_phone — VARCHAR(50)
  • management_name — VARCHAR(255)
  • data_date — DATE
  • provider_code — VARCHAR(50)
  • provider_name — VARCHAR(255)
  • province — VARCHAR(100) — NOT NULL

group_member

  • member_id — BIGSERIAL — Foreign key → members.id
  • group_id — BIGSERIAL — Foreign key → riding_group.id
  • joined_at — TIMESTAMP

group_message

  • id — BIGSERIAL — Primary key
  • sender_id — BIGINT
  • message — TEXT
  • image_url — VARCHAR(500)
  • sent_at — TIMESTAMP
  • group_id — BIGSERIAL — Foreign key → riding_group.id

image_assets

  • id — BIGSERIAL — Primary key
  • url — TEXT — NOT NULL
  • file_name — VARCHAR(255)
  • mime_type — VARCHAR(64)
  • size_bytes — BIGINT
  • uploader_user_id — BIGINT — Foreign key → members.id
  • created_at — TIMESTAMP

inquiry

  • id — BIGSERIAL — Primary key
  • user_id — BIGINT — Foreign key → members.id
  • title — TEXT
  • content — TEXT
  • created_at — TIMESTAMP

members (users)

  • id — BIGSERIAL — Primary key
  • email — VARCHAR(255)
  • password — VARCHAR(255) — NOT NULL
  • name — VARCHAR(100)
  • gender — VARCHAR(8)
  • height — FLOAT
  • weight — FLOAT
  • birth_date — DATE
  • phone — VARCHAR(30)
  • profile_image — TEXT
  • provider — provider_type
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

network_status

  • id — BIGSERIAL — Primary key
  • ride_session_id — BIGINT — Foreign key → ride_session.id — NOT NULL
  • connection_type — VARCHAR(16)
  • signal_strength — INT
  • is_connected — BOOLEAN
  • latency_ms — INT
  • upload_speed_mbps — NUMERIC(9,3)
  • download_speed_mbps — NUMERIC(9,3)
  • packet_loss_percentage — NUMERIC(5,2)
  • recorded_at — TIMESTAMP

obstacle_report

  • id — BIGSERIAL — Primary key
  • member_id — BIGINT — Foreign key → members.id
  • latitude — DOUBLE
  • longitude — DOUBLE
  • location — geography(Point,4326)
  • report_type — report_type
  • description — TEXT
  • status — report_status
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • image — TEXT

post_comment

  • id — BIGSERIAL — Primary key
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMP
  • post_id — BIGSERIAL — Foreign key → posts.id
  • member_id — BIGSERIAL — Foreign key → members.id

post_like

  • id — BIGSERIAL — Primary key — NOT NULL
  • created_at — BIGSERIAL
  • post_id — BIGSERIAL — Foreign key → posts.id
  • id (id2) — BIGSERIAL — Foreign key → members.id

post_tag

  • post_id — BIGSERIAL — Foreign key → posts.id
  • tag_id — BIGSERIAL — Foreign key → tags.id

posts

  • id — BIGSERIAL — Primary key
  • member_id — BIGSERIAL — Foreign key → members.id — NOT NULL
  • title — TEXT — NOT NULL
  • content — TEXT
  • view_count — BIGINT
  • like_count — BIGINT
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

question

  • id — BIGSERIAL — Primary key
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • title — TEXT — NOT NULL
  • content — TEXT
  • status — VARCHAR(32) — NOT NULL
  • view_count — BIGINT
  • like_count — BIGINT
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

question_comment

  • id — BIGSERIAL — Primary key
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMP
  • member_id — BIGSERIAL — Foreign key → members.id
  • question_id — BIGSERIAL — Foreign key → question.id

question_like

  • id — BIGSERIAL — Primary key — NOT NULL
  • created_at — TIMESTAMP
  • question_id — BIGSERIAL — Foreign key → question.id
  • member_id — BIGSERIAL — Foreign key → members.id

question_tag

  • tag_id — BIGSERIAL — Foreign key → tags.id
  • question_id — BIGSERIAL — Foreign key → question.id

ride_point

  • id — BIGSERIAL — Primary key
  • ride_session_id — BIGINT — Foreign key → ride_session.id — NOT NULL
  • latitude — DOUBLE
  • longitude — DOUBLE
  • location — geography(Point,4326)
  • speed_kmh — NUMERIC(7,2)
  • altitude — NUMERIC(9,2)
  • accuracy — NUMERIC(9,3)
  • heading — NUMERIC(7,3)
  • recorded_at — TIMESTAMP
  • network_quality — network_quality
  • battery_level — INT
  • is_offline_sync — BOOLEAN

ride_session

  • id — BIGSERIAL — Primary key
  • member_id — BIGSERIAL — Foreign key → members.id — NOT NULL
  • started_at — TIMESTAMP
  • ended_at — TIMESTAMP
  • total_distance_km — NUMERIC(10,2)
  • avg_speed_kmh — NUMERIC(7,2)
  • max_speed_kmh — NUMERIC(7,2)
  • calories_burned — NUMERIC(9,2)
  • status — ride_status
  • last_location_lat — DOUBLE
  • last_location_lng — DOUBLE
  • last_location_time — TIMESTAMP
  • last_location — geography(Point,4326)
  • network_quality — network_quality
  • connection_lost_count — INT
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

riding_group

  • id — BIGSERIAL — Primary key
  • group_name — VARCHAR(100) — NOT NULL
  • region — VARCHAR(6) — NOT NULL
  • image — TEXT
  • latitude — NUMERIC(9,6) — NOT NULL
  • longitude — NUMERIC(9,6) — NOT NULL
  • limit_members — INT — NOT NULL
  • description — TEXT — NOT NULL
  • deadline — DATE — NOT NULL
  • created_at — TIMESTAMP
  • update_at — TIMESTAMP

tags

  • id — BIGSERIAL — Primary key
  • name — VARCHAR(100) — NOT NULL