| 字段 | 类型 | 键 | 可空 | 默认 | 注释 |
|---|---|---|---|---|---|
| id | char(36) | PRI | NO | ||
| store_id | char(36) | YES | |||
| merchant_id | char(36) | YES | |||
| product_id | char(36) | YES | |||
| quantity | decimal(12,2) | YES | |||
| locked_quantity | decimal(12,2) | YES | |||
| warning_threshold | decimal(12,2) | YES | |||
| cost_price | decimal(12,2) | YES | |||
| last_movement_at | datetime(3) | YES | |||
| last_movement_type | longtext | YES | |||
| last_stocktake_at | datetime(3) | YES | |||
| is_deleted | tinyint(1) | YES | |||
| created_at | datetime(3) | YES | |||
| updated_at | datetime(3) | YES | |||
| store_price | decimal(10,2) | YES | |||
| store_member_price | decimal(10,2) | YES | |||
| is_listed | tinyint(1) | YES | |||
| store_note | longtext | YES | |||
| price_history | longtext | YES |
| 索引名 | 字段 | 类型 |
|---|---|---|
| PRIMARY | id | 唯一 |
| id | store_id | merchant_id | product_id | quantity | locked_quantity | warning_threshold | cost_price | last_movement_at | last_movement_type | last_stocktake_at | is_deleted |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 00596538-316d-41f2-ae32-f14646fe154b | f9698c67-095b-4db4-9f3e-6d9f5f005abc | d86ba3a1-c8aa-495e-9d1f-af5a495e4172 | 71f5c8db-53c3-4538-b158-9d2572db8d00 | 3.00 | 0.00 | 10.00 | 4.79 | 2026-11-09 20:57:49 | purchase | NULL | 0 |
| 008dd2b7-f3fb-4905-b318-9f650aaa6fea | f9698c67-095b-4db4-9f3e-6d9f5f005abc | d86ba3a1-c8aa-495e-9d1f-af5a495e4172 | 38eebe03-11bd-4f4f-8b87-759f671b11d2 | 0.00 | 0.00 | 10.00 | 8.14 | 2026-11-09 20:57:50 | purchase | NULL | 0 |
| 0152f4bf-c659-5f6f-b5a4-453b9f2836c5 | 4ad3efb6-6913-4a67-af89-5304861bf08e | de000063-1000-4000-8000-000000000003 | 002e7170-7f81-4d8b-baac-b984d2da256b | 58.00 | 0.00 | 10.00 | 42.68 | 2026-11-09 04:48:31.553000 | purchase | NULL | 0 |