采购表
CREATE TABLE `t_purchase`(
`id` INT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT '供货商ID',
`sku_id` INT UNSIGNED NOT NULL COMMENT '商品ID',
`number` INT UNSIGNED NOT NULL COMMENT '采购数量',
`warehouse_id` INT UNSIGNED NOT NULL COMMENT '仓库ID',
`in_price` DECIMAL(10, 2) UNSIGNED NOT NULL COMMENT '采购价格',
`out_price` DECIMAL(10, 2) UNSIGNED NOT NULL COMMENT '零售价',
`buyer_Id` INT UNSIGNED NOT NULL COMMENT '采购员ID',
`status` TINYINT UNSIGNED NOT NULL COMMENT '状态:1未完成,2已完成',
`created_at` TIMESTAMP NOT NULL DEFAULT NOW() COMMENT '创建时间',
INDEX idx_sku_id(`sku_id`),
INDEX idx_warehouse_id(`warehouse_id`),
INDEX idx_buyer_id(`buyer_id`),
INDEX idx_status(`status`),
INDEX idx_created_at(`created_at`)
) COMMENT = '采购表';
入库表