Do-go ERD v6

Tables (18)

asset_generation_tasks

  • id — BIGINT — Primary key
  • target_type — VARCHAR(20) — NOT NULL
  • target_id — BIGINT — NOT NULL
  • source_image_url — VARCHAR(512) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • worker_id — VARCHAR(100)
  • asset_3d_id — BIGINT — Foreign key → assets_3d.id
  • result_url — VARCHAR(512)
  • error_message — TEXT
  • attempt_count — INTEGER — NOT NULL
  • started_at — TIMESTAMP
  • finished_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

assets_3d

  • id — BIGINT — Primary key
  • target_type — VARCHAR(20) — NOT NULL
  • target_id — BIGINT — NOT NULL
  • file_format — VARCHAR(10) — NOT NULL
  • model_url — VARCHAR(512) — NOT NULL
  • file_size_bytes — INTEGER
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

fixture_masters

  • id — BIGINT — Primary key
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • width — INTEGER — NOT NULL
  • height — INTEGER — NOT NULL
  • depth — INTEGER — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

fixture_version_products

  • id — BIGINT — Primary key
  • fixture_version_id — BIGINT — Foreign key → fixture_versions.id — NOT NULL
  • variant_id — BIGINT — Foreign key → product_variants.id — NOT NULL
  • local_pos_x — INTEGER — NOT NULL
  • local_pos_y — INTEGER — NOT NULL
  • local_pos_z — INTEGER — NOT NULL
  • memo — VARCHAR(500)
  • status — VARCHAR(50) — NOT NULL

fixture_versions

  • id — BIGINT — Primary key
  • fixture_master_id — BIGINT — Foreign key → fixture_masters.id — NOT NULL
  • version_name — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

layout_fixtures

  • id — BIGINT — Primary key
  • layout_id — BIGINT — Foreign key → layouts.id — NOT NULL
  • fixture_version_id — BIGINT — Foreign key → fixture_versions.id — NOT NULL
  • world_pos_x — INTEGER — NOT NULL
  • world_pos_y — INTEGER — NOT NULL
  • world_pos_z — INTEGER — NOT NULL
  • world_rot_y — SMALLINT — NOT NULL
  • width — INTEGER — NOT NULL
  • height — INTEGER — NOT NULL
  • depth — INTEGER — NOT NULL

layouts

  • id — BIGINT — Primary key
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • comment — VARCHAR(1000) — ARCHAR(1000) NUL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

product_detection_items

  • id — BIGINT — Primary key
  • task_id — BIGINT — Foreign key → product_detection_tasks.id — NOT NULL
  • slot — SMALLINT — NOT NULL
  • thumbnail_key — VARCHAR(512) — NOT NULL
  • relative_position_x — DECIMAL(8, 6) — NOT NULL
  • relative_position_y — DECIMAL(8, 6) — NOT NULL
  • relative_size_width — DECIMAL(8, 6) — NOT NULL
  • relative_size_height — DECIMAL(8, 6) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • asset_generation_status — VARCHAR(20) — NOT NULL
  • asset_generation_task_id — BIGINT — Foreign key → asset_generation_tasks.id
  • asset_3d_id — BIGINT — Foreign key → assets_3d.id
  • asset_error_message — TEXT
  • product_master_id — BIGINT — Foreign key → product_masters.id
  • variant_id — BIGINT — Foreign key → product_variants.id
  • confidence — DECIMAL(5, 4)
  • bbox_xyxy — JSONB
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

product_detection_tasks

  • id — BIGINT — Primary key
  • store_id — BIGINT — Foreign key → stores.id
  • fixture_id — BIGINT — Foreign key → fixture_masters.id
  • fixture_version_id — BIGINT — Foreign key → fixture_versions.id
  • requested_by_id — BIGINT — Foreign key → users.id
  • status — VARCHAR(20) — NOT NULL
  • error_message — TEXT
  • source_image_key — VARCHAR(512)
  • callback_token — VARCHAR(128) — NOT NULL
  • started_at — TIMESTAMP
  • finished_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

product_masters

  • id — BIGINT — Primary key
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • name — VARCHAR(100)
  • price — INTEGER
  • image_url — VARCHAR(512)
  • width — INTEGER — NOT NULL
  • height — INTEGER — NOT NULL
  • depth — INTEGER
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

product_variants

  • id — BIGINT — Primary key
  • product_master_id — BIGINT — Foreign key → product_masters.id — NOT NULL
  • size — VARCHAR(20)
  • color — VARCHAR(30)
  • sku_code — VARCHAR(50)
  • barcode_image_url — VARCHAR(512)
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

store_images

  • id — BIGINT — Primary key
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • image_type — VARCHAR(20) — NOT NULL
  • image_url — VARCHAR(512) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

store_inventories

  • id — BIGINT — Primary key
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • variant_id — BIGINT — Foreign key → product_variants.id — NOT NULL
  • stock_quantity — INTEGER — NOT NULL
  • safety_stock — INTEGER — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

store_invitations

  • id — BIGINT — Primary key
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • inviter_id — BIGINT — Foreign key → users.id — NOT NULL
  • invitee_email — VARCHAR(100) — NOT NULL
  • invite_token — VARCHAR(255) — NOT NULL
  • target_role — VARCHAR(20) — NOT NULL
  • is_used — BOOLEAN — NOT NULL
  • expires_at — TIMESTAMP — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

store_members

  • id — BIGINT — Primary key
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • role — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

store_products

  • id — BIGINT — Primary key
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • product_master_id — BIGINT — Foreign key → product_masters.id — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

stores

  • id — BIGINT — Primary key
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • max_admin_count — INTEGER — NOT NULL
  • width — INTEGER — NOT NULL
  • height — INTEGER — NOT NULL
  • depth — INTEGER — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

users

  • id — BIGINT — Primary key
  • email — VARCHAR(100)
  • password — VARCHAR(128) — NOT NULL
  • name — VARCHAR(20) — NOT NULL
  • profile_image_url — VARCHAR(512)
  • oauth_provider — VARCHAR(20)
  • oauth_uid — VARCHAR(100)
  • role — VARCHAR(20) — NOT NULL
  • confirmed — BOOLEAN — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • is_staff — BOOLEAN — NOT NULL
  • is_superuser — BOOLEAN — NOT NULL
  • last_login — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP