CREATE TABLE `t_delivery`(
`id` INT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT '主键',
`order_id` INT UNSIGNED NOT NULL COMMENT '订单ID',
`sku` JSON NOT NULL COMMENT '商品',
`qa_id` INT UNSIGNED NOT NULL COMMENT '质检员ID',
`dy_id` INT UNSIGNED NOT NULL COMMENT '发货员ID',
`post_id` INT UNSIGNED NOT NULL COMMENT '快递单号',
`price` DECIMAL(4, 2) UNSIGNED NOT NULL COMMENT '快递费',
`d_company` TINYINT UNSIGNED NOT NULL COMMENT '快递公司编号',
`address_id` INT UNSIGNED NOT NULL COMMENT '收货地址ID',
`warehouse_id` INT UNSIGNED NOT NULL COMMENT '仓库ID',
`created_at` TIMESTAMP NOT NULL DEFAULT NOW() COMMENT '创建时间',
INDEX idx_order_id(`order_id`),
INDEX idx_qa_id(`qa_id`),
INDEX idx_dy_id(`dy_id`),
INDEX idx_post_id(`post_id`),
INDEX idx_warehouse_id(`warehouse_id`),
INDEX idx_address_id(`address_id`),
INDEX idx_d_company(`d_company`)
) COMMENT = '快递表';