Dive-Trucker

Tables (11)

drop_off_locations

  • id — int(11) — Primary key — NOT NULL
  • location_id — int(11) — Foreign key → locations.id — NOT NULL

locations

  • id — int(11) — Primary key — NOT NULL
  • city — varchar(50) — NOT NULL
  • district — varchar(50) — NOT NULL
  • address_detail — varchar(255) — NOT NULL
  • latitude — double(64) — NOT NULL
  • longtitude — double(64) — NOT NULL

order_items

  • id — int(11) — Primary key — NOT NULL
  • orde_id (id2) — int(11) — Foreign key → orders.id — NOT NULL
  • id (id22) — int(11) — Foreign key → orders.order_tag_id — NOT NULL
  • product_name — varchar(100) — NOT NULL
  • quantity — bigint(20) — NOT NULL
  • unit — varchar(20)

order_tags

  • id — int(11) — Primary key — NOT NULL
  • tag_name — varchar(50) — NOT NULL

orders

  • id — int(11) — Primary key — NOT NULL
  • user_id — int(11) — Foreign key → users.id — NOT NULL
  • pick_up_location_id — int(11) — Foreign key → pick_up_locations.id — NOT NULL
  • drop_off_location_id — int(11) — Foreign key → drop_off_locations.id — NOT NULL
  • order_tag_id (id2) — int(11) — Foreign key → order_tags.id — NOT NULL
  • pick_up_datetiem — datetime — NOT NULL
  • drop_off_datetime — datetime — NOT NULL
  • actual_arrival_datetime — datetime
  • vehicle_type — int(11) — NOT NULL
  • tonnage — int(11) — NOT NULL
  • payment_amount — int(11) — NOT NULL — 단위: 원
  • payment_type — bit(1) — NOT NULL — 선불, 후불
  • Field
  • created_at — timestamp — NOT NULL
  • updated_at — datetime — NOT NULL

pick_up_locations

  • id — int(11) — Primary key — NOT NULL
  • location_id — int(11) — Foreign key → locations.id — NOT NULL

role

  • id — int(11) — Primary key — NOT NULL
  • authority — varchar(255) — NOT NULL

user_oauths

  • id — int(11) — Primary key — NOT NULL
  • id (user_id) — int(11) — Foreign key → users.id — NOT NULL
  • provider — varchar(50) — NOT NULL
  • access_token — varchar(255) — NOT NULL — encryption
  • refresh_token — varchar(255) — NOT NULL — encryption
  • token_expires_at — datetime — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

user_roles

  • user_id — int(11) — Foreign key → users.id — NOT NULL
  • role_id — int(11) — Foreign key → role.id — NOT NULL

users

  • id — int(11) — Primary key — NOT NULL
  • username — varchar(15) — NOT NULL
  • phone_number — var_char(20) — NOT NULL
  • email — varchar(255) — NOT NULL — unique
  • created_at — timestamp — NOT NULL — current timestamp
  • updated_at — timestamp — NOT NULL — current timestamp on update timestamp
  • enabled — bit(1) — NOT NULL
  • profile_image_url — varchar(255)

vehicles

  • id — int(11) — Primary key — NOT NULL
  • user_id — int(11) — Foreign key → users.id — NOT NULL
  • vehicle_type (car_type) — int(11) — NOT NULL — by kakao API Document
  • license_plate — varchar(255) — NOT NULL
  • has_temperature_control — bit(1) — NOT NULL
  • cargobin_length — varchar(255) — NOT NULL
  • cargobin_width — varchar(255)
  • fuel_type — int(11) — NOT NULL — Gasoline, Premium_Gasoline, Diesel, LPG, Electric, HybridElectric, PlugInHybridElectric, Hydrogen
  • created_at — datetime — NOT NULL
  • updated_at — datetime