b2c_warehouse_shelf_good_relation.sql 815 B

12345678910111213141516171819202122
  1. /**
  2. Source Server Version: 8.0.31
  3. Source Database: backendsys
  4. Date: 2023/08/18 12:51:10
  5. */
  6. DROP TABLE IF EXISTS `b2c_warehouse_shelf_good_relation`;
  7. CREATE TABLE `b2c_warehouse_shelf_good_relation` (
  8. PRIMARY KEY (`id`),
  9. `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
  10. `warehouse_id` BIGINT NOT NULL COMMENT '仓库ID',
  11. `warehouse_shelf_id` BIGINT NOT NULL COMMENT '货位ID',
  12. `good_id` BIGINT NOT NULL COMMENT '商品ID',
  13. `is_priority` TINYINT(1) DEFAULT '-1' COMMENT '是否设置为优先货位 (-1否, 1是)'
  14. ) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='仓库货位与商品关系表';
  15. INSERT INTO b2c_warehouse_shelf_good_relation(warehouse_id, warehouse_shelf_id, good_id, is_priority) VALUES
  16. (1, 1, 1, 1),
  17. (1, 2, 1, -1),
  18. (1, 3, 1, -1),
  19. (1, 4, 1, -1)
  20. ;