/**
Source Server Version: 8.0.31
Source Database: backendsys
Date: 2023/08/18 12:51:10
*/

DROP TABLE IF EXISTS `b2c_warehouse_shelf_good_relation`;

CREATE TABLE `b2c_warehouse_shelf_good_relation` (
    PRIMARY KEY (`id`),
    `id` BIGINT(10) AUTO_INCREMENT COMMENT 'ID',
    `warehouse_id` BIGINT(10) NOT NULL COMMENT '仓库ID',
    `warehouse_shelf_id` BIGINT(10) NOT NULL COMMENT '货位ID',
    `good_id` BIGINT(10) NOT NULL COMMENT '商品ID',
    `is_priority` TINYINT(1) DEFAULT '-1' COMMENT '是否设置为优先货位 (-1否, 1是)'
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='仓库货位与商品关系表';

INSERT INTO b2c_warehouse_shelf_good_relation(warehouse_id, warehouse_shelf_id, good_id, is_priority) VALUES
    (1, 1, 1, 1),
    (1, 2, 1, -1),
    (1, 3, 1, -1),
    (1, 4, 1, -1)
;
