WMS データモデル ER図 v3.0

3PL対応 / 出庫拡張 / ピッキングエリア分割 / 引渡・積込工程 / 実績送信
v3.0 主要変更:3PL(複数荷主)対応・在庫ステータスマスタ化・ピッキングエリア管理・受注を伴わない出庫・引渡仮置工程・積込管理・出荷実績送信・課金請求機能を追加。 全テーブル数:v2.0 = 30 → v3.0 = 60+ テーブル
記号凡例
PK = 主キー / FK = 外部キー / UK = 一意キー
関連線:||--o{ 1対多必須 / }o--|| 多対1
赤バッジ「NEW」 = v3.0 新規追加 / 「拡張」 = v2.0 から項目追加

13PL基盤・荷主管理NEW

3PL運用の核となるテナント管理。すべての業務データに owner_code を紐付け、荷主ごとのデータ分離を実現する。
erDiagram OWNER ||--o{ OWNER_CONTRACT : "契約" OWNER ||--o{ USER_OWNER_ACCESS : "アクセス権" OWNER ||--o{ OWNER_BILLING_RULE : "課金条件" OWNER ||--o{ OWNER_INTEGRATION : "連携設定" OWNER ||--o{ OWNER_PORTAL_USER : "ポータルユーザー" USER ||--o{ USER_OWNER_ACCESS : "" OWNER_BILLING_RULE ||--o{ BILLING_INVOICE : "請求生成" OWNER { string owner_code PK string name string name_kana string contact_name string contact_email string contact_tel string address date contract_start date contract_end string status "active/suspended/terminated" string default_currency datetime created_at } OWNER_CONTRACT { bigint id PK string owner_code FK string contract_no date period_start date period_end string service_type "保管のみ/保管+荷役/フル" json sla_terms string status } USER_OWNER_ACCESS { bigint id PK string user_id FK string owner_code FK string access_level "operator/viewer/admin" date valid_from date valid_to } OWNER_BILLING_RULE { bigint id PK string owner_code FK string rule_type "保管料/入荷料/出荷料/その他" string unit "坪/パレット/ケース/件" decimal unit_price json conditions "適用条件" date valid_from date valid_to } OWNER_INTEGRATION { bigint id PK string owner_code FK string integration_type "受注取込/実績送信/在庫連携" string protocol "REST/SFTP/EDI/MAIL" string endpoint_url json credentials_encrypted string data_format "JSON/CSV/XML/EDI" json mapping_rules string schedule "realtime/hourly/daily" string status } OWNER_PORTAL_USER { string portal_user_id PK string owner_code FK string email UK string name string password_hash json permissions "view_stock/view_shipment/etc" bool active datetime last_login_at } BILLING_INVOICE { bigint id PK string owner_code FK string invoice_no UK date period_start date period_end decimal subtotal decimal tax decimal total string status "draft/issued/paid/cancelled" datetime issued_at }

2マスタモデル(v2.0から拡張)

商品・ロケ・取引先・ユーザーに owner_code を追加し3PL対応。STATUS_MASTERPICKING_AREA を新規追加。
erDiagram OWNER ||--o{ ITEM : "荷主別" WAREHOUSE ||--o{ LOCATION : "" PICKING_AREA ||--o{ LOCATION : "エリア所属" LOCATION ||--o{ LOCATION_OWNER_ASSIGNMENT : "荷主専用ロケ" OWNER ||--o{ LOCATION_OWNER_ASSIGNMENT : "" STATUS_MASTER ||--o{ STOCK : "ステータス参照" ITEM ||--o{ ITEM_BARCODE : "" USER ||--o{ USER_WAREHOUSE : "" USER ||--o{ USER_DAILY_AREA : "日次担当エリア" PICKING_AREA ||--o{ USER_DAILY_AREA : "" CARRIER ||--o{ CARRIER_ROUTE : "便・方面" WAREHOUSE { string warehouse_code PK string name string address string timezone string operator_company "倉庫運営会社" } PICKING_AREA { string area_code PK string warehouse_code FK string name "1階常温/2階常温/冷蔵/冷凍" string floor "1F/2F/B1" string temp_zone "AMB/COLD/FROZ" bool requires_special_skill int sort_order "動線順" } LOCATION { string location_code PK string warehouse_code FK string area_code FK "ピッキングエリア" string zone "保管/ピック/返品/不適合品/廃棄/STAGE" string aisle string rack string level string bin string abc_class bool pickable bool mixed_allowed bool mixed_owner_allowed "複数荷主混載可" string default_status "良品/不適合等の既定値" string temp_zone int capacity_weight int capacity_volume bool active } LOCATION_OWNER_ASSIGNMENT { bigint id PK string location_code FK string owner_code FK string assignment_type "exclusive/shared" } STATUS_MASTER { string status_code PK string status_name "良品/不良/保留/検品中/廃棄/再検査中等" string status_name_alt "ユーザー任意名" bool allocatable "引当対象か" bool shippable "出荷可能か" string color_hint "UI色指定" bool deletable "システム標準ステータスは不可" int display_order } ITEM { string item_code PK string owner_code FK "荷主別SKU管理" string item_name string category string uom int case_qty int pallet_qty int weight_g bool lot_managed bool expiry_managed bool serial_managed string temp_zone int expiry_warning_days bool active } ITEM_BARCODE { bigint id PK string item_code FK string barcode UK string type int qty_per_scan } USER { string user_id PK string emp_code UK string name string nfc_uid string role_code FK bool active } USER_WAREHOUSE { string user_id FK string warehouse_code FK } USER_DAILY_AREA { bigint id PK string user_id FK string warehouse_code FK string area_code FK date work_date string assigned_by } CARRIER { string carrier_code PK string name string api_endpoint json credentials string label_format bool active } CARRIER_ROUTE { string route_code PK string carrier_code FK string area_name "関東/関西/中部等" time pickup_time string lane_code "STAGE-XXX" }

3在庫モデル(v2.0から拡張)

在庫ステータスをマスタ化し、引当可否を柔軟に制御。STOCK_STATUS_HISTORY でステータス遷移を追跡。LOT_HOLD でロット単位の出荷止め管理。
erDiagram ITEM ||--o{ STOCK : "" LOCATION ||--o{ STOCK : "" STATUS_MASTER ||--o{ STOCK : "" STOCK ||--o{ STOCK_HISTORY : "" STOCK ||--o{ STOCK_STATUS_HISTORY : "ステータス遷移" LOT ||--o{ LOT_HOLD : "ロット出荷止め" OWNER ||--o{ STOCK : "荷主別" STOCK { bigint stock_id PK string item_code FK string location_code FK string lot_no date expiry_date string serial_no string status_code FK decimal qty_on_hand decimal qty_allocated decimal qty_available string owner_code FK datetime received_at datetime updated_at bigint version } LOT { string lot_no PK string item_code FK date mfg_date date expiry_date string supplier_code FK string status } LOT_HOLD { bigint id PK string lot_no FK string item_code FK string hold_reason "製造不具合/品質検査中/その他" string hold_status "active/released" string requested_by string approved_by datetime hold_at datetime released_at text notes } SERIAL { string serial_no PK string item_code FK string current_status datetime created_at } STOCK_HISTORY { bigint id PK bigint stock_id FK string txn_type "RECEIPT/PICK/MOVE/ADJUST/SHIP/RETURN/COUNT/STATUS_CHANGE" string ref_no decimal qty_before decimal qty_change decimal qty_after string user_id FK string device_id datetime occurred_at string remark } STOCK_STATUS_HISTORY { bigint id PK bigint stock_id FK string status_before FK string status_after FK string change_reason string changed_by FK string approved_by FK datetime changed_at text notes }

4入荷モデル(v2.0からの軽微拡張)

既存構造を維持。owner_code 追加のみ。差異承認のフローは現状を流用。
erDiagram INBOUND_ORDER ||--|{ INBOUND_ORDER_LINE : "" INBOUND_ORDER ||--o{ INBOUND_RECEIPT : "" INBOUND_RECEIPT ||--|{ INBOUND_RECEIPT_LINE : "" INBOUND_RECEIPT_LINE ||--o{ INBOUND_VARIANCE : "" INBOUND_RECEIPT_LINE ||--o{ PUTAWAY_TASK : "" OWNER ||--o{ INBOUND_ORDER : "" INBOUND_ORDER { string asn_no PK string warehouse_code FK string owner_code FK string supplier_code FK date eta_date string status } INBOUND_ORDER_LINE { bigint id PK string asn_no FK int line_no string item_code FK decimal qty_planned string lot_no date expiry_date } INBOUND_RECEIPT { string receipt_no PK string asn_no FK datetime received_at string vehicle_no string status } INBOUND_RECEIPT_LINE { bigint id PK string receipt_no FK string item_code FK decimal qty_received string lot_no date expiry_date string status_code FK } INBOUND_VARIANCE { bigint id PK bigint receipt_line_id FK decimal qty_variance string reason string approved_by datetime approved_at } PUTAWAY_TASK { bigint id PK bigint receipt_line_id FK string suggested_location FK string actual_location FK decimal qty string status string assigned_to FK }

5出荷モデル(v2.0から大幅拡張)大幅変更

WAVE にエリア分割対応、SUB_WAVE 追加(ゾーンリレー/エリア並行)。CONTAINER(カゴ・カートン)でピック→引渡→積込まで一貫追跡。
erDiagram OUTBOUND_ORDER ||--|{ OUTBOUND_ORDER_LINE : "" OUTBOUND_ORDER_LINE ||--o{ ALLOCATION : "" WAVE ||--o{ SUB_WAVE : "エリア分割" SUB_WAVE ||--o{ ALLOCATION : "" SUB_WAVE ||--o{ PICK_TASK : "" PICK_TASK }o--|| USER : "作業者" PICK_TASK ||--o{ CONTAINER_ITEM : "カゴへ投入" CONTAINER ||--o{ CONTAINER_ITEM : "" CONTAINER ||--o{ CONTAINER_HANDOVER : "エリア間引継" OUTBOUND_ORDER ||--o{ SHIPMENT : "" SHIPMENT ||--|{ PACKAGE : "" OWNER ||--o{ OUTBOUND_ORDER : "" OUTBOUND_ORDER { string order_no PK string warehouse_code FK string owner_code FK string customer_code FK date ship_date string priority string temp_zone string carrier_code FK string route_code FK string status } OUTBOUND_ORDER_LINE { bigint id PK string order_no FK int line_no string item_code FK decimal qty_ordered decimal qty_allocated decimal qty_picked decimal qty_shipped } WAVE { string wave_no PK string warehouse_code FK string strategy "SINGLE/MULTI/TOTAL" string area_split_mode "PARALLEL/RELAY/NONE" string status datetime created_at } SUB_WAVE { bigint id PK string wave_no FK string area_code FK string assigned_to FK int sequence_in_relay string status "未/作業中/完了/引継待ち" } ALLOCATION { bigint id PK bigint order_line_id FK bigint stock_id FK bigint sub_wave_id FK decimal qty string status } PICK_TASK { bigint id PK bigint sub_wave_id FK bigint allocation_id FK string location_code FK string item_code FK decimal qty_required decimal qty_picked string assigned_to FK bigint container_id FK string status datetime started_at datetime completed_at } CONTAINER { string container_id PK string container_type "CAGE/CARTON/PALLET" string current_location FK string current_status "PICKING/STAGING/PACKED/HANDED" string for_order_no FK string area_code FK } CONTAINER_ITEM { bigint id PK string container_id FK string item_code FK decimal qty bigint pick_task_id FK datetime added_at } CONTAINER_HANDOVER { bigint id PK string container_id FK string from_area_code FK string to_area_code FK string from_user_id FK string to_user_id FK datetime handed_at } SHIPMENT { string shipment_no PK string order_no FK string carrier_code FK string tracking_no datetime shipped_at string status } PACKAGE { bigint id PK string shipment_no FK string box_type decimal weight_kg }

6引渡・積込・出荷工程NEW

STAGING(仮置きエリア管理)、LOADING(積込管理)、HANDOVER(引き渡し記録)、DELIVERY_TRACKING(配送追跡)の4機能を新規追加。
erDiagram STAGING_AREA ||--o{ STAGING_RECORD : "" STAGING_RECORD }o--|| OUTBOUND_ORDER : "" STAGING_RECORD }o--|| CONTAINER : "" LOADING_PLAN ||--o{ LOADING_DETAIL : "" LOADING_PLAN }o--|| CARRIER_ROUTE : "" LOADING_DETAIL }o--|| SHIPMENT : "" LOADING_PLAN ||--o{ LOADING_HANDOVER : "" SHIPMENT ||--o{ DELIVERY_TRACKING : "" STAGING_AREA { string staging_code PK string warehouse_code FK string lane_code "STAGE-YMT-A14" string carrier_code FK string route_code FK time pickup_time date work_date string status } STAGING_RECORD { bigint id PK string staging_code FK string container_id FK string order_no FK int package_seq int total_packages_expected int total_packages_arrived bool is_complete "受注全梱包揃ったか" datetime arrived_at } LOADING_PLAN { string loading_no PK string warehouse_code FK string carrier_code FK string route_code FK date load_date time pickup_time string vehicle_no string driver_name int total_packages decimal total_weight_kg string status "予定/積込中/完了" } LOADING_DETAIL { bigint id PK string loading_no FK string shipment_no FK int package_seq bool loaded datetime loaded_at string loaded_by FK } LOADING_HANDOVER { bigint id PK string loading_no FK string warehouse_user_id FK string driver_name string driver_signature_url datetime handover_at text remarks } DELIVERY_TRACKING { bigint id PK string shipment_no FK string tracking_no string status "PICKED_UP/IN_TRANSIT/DELIVERED/RETURNED" datetime status_at string location_text text raw_response }

7その他出庫(受注を伴わない出庫)NEW

社内移動・廃棄・サンプル・仕入先返品など、受注を伴わない出庫専用機能。
erDiagram MISC_OUTBOUND ||--|{ MISC_OUTBOUND_LINE : "" MISC_OUTBOUND_LINE }o--|| STOCK : "対象在庫" MISC_OUTBOUND { string misc_no PK string warehouse_code FK string owner_code FK string outbound_type "INTER_WH/DISPOSAL/SAMPLE/RETURN_SUPPLIER/OTHER" string destination "送り先記載" string reason string requested_by FK string approved_by FK date outbound_date string status "申請中/承認済/出庫済/取消" text notes } MISC_OUTBOUND_LINE { bigint id PK string misc_no FK bigint stock_id FK string item_code FK decimal qty string lot_no string serial_no }

8棚卸・移動・調整(v2.0から軽微拡張)

既存維持、owner_code追加。
erDiagram STOCKTAKE_PLAN ||--|{ STOCKTAKE_TASK : "" STOCKTAKE_TASK ||--o{ STOCKTAKE_COUNT : "" STOCKTAKE_TASK ||--o{ ADJUSTMENT : "" STOCKTAKE_PLAN { string plan_no PK string warehouse_code FK string owner_code FK string type date target_date string status json target_filter } STOCKTAKE_TASK { bigint id PK string plan_no FK string location_code FK string status } STOCKTAKE_COUNT { bigint id PK bigint task_id FK int count_round string item_code FK decimal qty_counted string counted_by FK } ADJUSTMENT { bigint id PK bigint stock_id FK string txn_type decimal qty_change string reason_code string approved_by FK } MOVEMENT { bigint id PK bigint stock_id FK string from_location FK string to_location FK decimal qty string moved_by FK } REPLENISHMENT { bigint id PK string item_code FK string from_location FK string to_location FK decimal qty_required decimal qty_replenished string status }

9実績送信・配送連携NEW

荷主別の実績送信ジョブ管理。リアルタイム送信と日次バッチ両対応。
erDiagram OWNER_INTEGRATION ||--o{ INTEGRATION_JOB : "" INTEGRATION_JOB ||--o{ INTEGRATION_LOG : "" SHIPMENT ||--o{ INTEGRATION_JOB : "実績通知" INTEGRATION_JOB { bigint id PK string owner_code FK bigint integration_id FK string job_type "受注取込/実績送信/在庫連携" string trigger_type "realtime/batch" string ref_entity "shipment/inbound/etc" string ref_id json payload string status "queued/sending/success/failed" int retry_count datetime scheduled_at datetime executed_at } INTEGRATION_LOG { bigint id PK bigint job_id FK int http_status text response_body datetime executed_at }

10課金・請求NEW

保管料・荷役料の自動計算、月次請求書生成。
erDiagram OWNER ||--o{ BILLING_DAILY_USAGE : "" OWNER ||--o{ BILLING_INVOICE : "" BILLING_INVOICE ||--|{ BILLING_INVOICE_LINE : "" OWNER_BILLING_RULE ||--o{ BILLING_INVOICE_LINE : "" BILLING_DAILY_USAGE { bigint id PK string owner_code FK date usage_date string usage_type "STORAGE/INBOUND/OUTBOUND/RETURN/STOCKTAKE" decimal quantity string unit json detail } BILLING_INVOICE { bigint id PK string owner_code FK string invoice_no UK date period_start date period_end decimal subtotal decimal tax decimal total string status datetime issued_at } BILLING_INVOICE_LINE { bigint id PK bigint invoice_id FK bigint billing_rule_id FK string item_description decimal quantity decimal unit_price decimal amount }

11全体結合(簡略図)

主要エンティティのみ抜粋。owner_code でテナント分離されているのが3PL設計の中核。
erDiagram OWNER ||--o{ ITEM : "" OWNER ||--o{ STOCK : "" OWNER ||--o{ INBOUND_ORDER : "" OWNER ||--o{ OUTBOUND_ORDER : "" OWNER ||--o{ MISC_OUTBOUND : "" OWNER ||--o{ BILLING_INVOICE : "" INBOUND_ORDER ||--o{ STOCK : "計上" OUTBOUND_ORDER ||--o{ WAVE : "" WAVE ||--o{ SUB_WAVE : "エリア分割" SUB_WAVE ||--o{ PICK_TASK : "" PICK_TASK ||--o{ CONTAINER : "" CONTAINER ||--o{ STAGING_RECORD : "仮置" STAGING_RECORD ||--o{ LOADING_DETAIL : "積込" LOADING_PLAN ||--o{ LOADING_HANDOVER : "引渡" SHIPMENT ||--o{ DELIVERY_TRACKING : "配送追跡" SHIPMENT ||--o{ INTEGRATION_JOB : "実績送信" OWNER { string owner_code PK } ITEM { string item_code PK } STOCK { bigint stock_id PK } INBOUND_ORDER { string asn_no PK } OUTBOUND_ORDER { string order_no PK } MISC_OUTBOUND { string misc_no PK } WAVE { string wave_no PK } SUB_WAVE { bigint id PK } PICK_TASK { bigint id PK } CONTAINER { string container_id PK } STAGING_RECORD { bigint id PK } LOADING_PLAN { string loading_no PK } LOADING_DETAIL { bigint id PK } LOADING_HANDOVER { bigint id PK } SHIPMENT { string shipment_no PK } DELIVERY_TRACKING { bigint id PK } INTEGRATION_JOB { bigint id PK } BILLING_INVOICE { bigint id PK }

12全テーブル一覧(v3.0)

v2.0からの追加・拡張を網羅。
領域テーブル名状態概要
3PL基盤OWNERNEW荷主マスタ
3PL基盤OWNER_CONTRACTNEW荷主契約
3PL基盤USER_OWNER_ACCESSNEWユーザー荷主アクセス権
3PL基盤OWNER_BILLING_RULENEW荷主課金ルール
3PL基盤OWNER_INTEGRATIONNEW荷主連携設定
3PL基盤OWNER_PORTAL_USERNEW荷主ポータル用ユーザー
マスタWAREHOUSE拡張倉庫運営会社追加
マスタPICKING_AREANEWピッキングエリア
マスタLOCATION拡張area_code, mixed_owner_allowed等
マスタLOCATION_OWNER_ASSIGNMENTNEW荷主専用ロケ
マスタSTATUS_MASTERNEW在庫ステータスマスタ(任意追加可)
マスタITEM拡張owner_code追加
マスタITEM_BARCODE維持商品バーコード
マスタUSER維持ユーザー
マスタUSER_WAREHOUSE維持所属倉庫
マスタUSER_DAILY_AREANEW日次担当エリア割当
マスタCARRIERNEW配送業者マスタ
マスタCARRIER_ROUTENEW便・方面マスタ
在庫STOCK拡張status_code (FK化)
在庫LOT維持ロット
在庫LOT_HOLDNEWロット出荷止め
在庫SERIAL維持シリアル
在庫STOCK_HISTORY維持在庫履歴
在庫STOCK_STATUS_HISTORYNEWステータス遷移履歴
入荷INBOUND_ORDER拡張owner_code追加
入荷INBOUND_ORDER_LINE維持
入荷INBOUND_RECEIPT維持
入荷INBOUND_RECEIPT_LINE拡張status_code (FK化)
入荷INBOUND_VARIANCE維持
入荷PUTAWAY_TASK維持
出荷OUTBOUND_ORDER拡張owner_code, route_code等
出荷OUTBOUND_ORDER_LINE維持
出荷WAVE拡張area_split_mode追加
出荷SUB_WAVENEWエリア別サブウェーブ
出荷ALLOCATION拡張sub_wave_id参照に変更
出荷PICK_TASK拡張container_id追加
出荷CONTAINERNEWカゴ・カートン追跡
出荷CONTAINER_ITEMNEWカゴ内商品
出荷CONTAINER_HANDOVERNEWエリア間引継
出荷SHIPMENT維持
出荷PACKAGE維持
引渡・積込STAGING_AREANEW仮置きエリア・レーン
引渡・積込STAGING_RECORDNEW仮置き到着記録
引渡・積込LOADING_PLANNEW積込予定
引渡・積込LOADING_DETAILNEW積込明細
引渡・積込LOADING_HANDOVERNEW引き渡し記録
配送追跡DELIVERY_TRACKINGNEW配送状況追跡
その他出庫MISC_OUTBOUNDNEW受注を伴わない出庫
その他出庫MISC_OUTBOUND_LINENEWその他出庫明細
棚卸STOCKTAKE_PLAN拡張owner_code追加
棚卸STOCKTAKE_TASK維持
棚卸STOCKTAKE_COUNT維持
調整・移動ADJUSTMENT維持
調整・移動MOVEMENT維持
調整・移動REPLENISHMENT維持
連携INTEGRATION_JOB拡張OWNER_INTEGRATION参照、payload保持
連携INTEGRATION_LOG維持
課金・請求BILLING_DAILY_USAGENEW日次課金実績
課金・請求BILLING_INVOICENEW請求書ヘッダ
課金・請求BILLING_INVOICE_LINENEW請求書明細
共通AUDIT_LOG維持監査ログ
共通DEVICE維持HT端末
共通DEVICE_SYNC維持HT同期

v3.0 変更サマリ