/*
SQLyog v10.2 
MySQL - 8.0.26 : Database - warehouse2
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`warehouse2` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `warehouse2`;

/*Table structure for table `in_storehouse` */

DROP TABLE IF EXISTS `in_storehouse`;

CREATE TABLE `in_storehouse` (
  `in_storehouse_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '入库单号(IN开头)',
  `receiving_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '接货单号',
  `location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位编码',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `create_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建时间',
  `check_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '审核人',
  `check_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核时间',
  PRIMARY KEY (`in_storehouse_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='入库管理';

/*Data for the table `in_storehouse` */

insert  into `in_storehouse`(`in_storehouse_id`,`receiving_id`,`location_id`,`status`,`remarks`,`create_person`,`create_time`,`check_person`,`check_time`) values ('IN1682176413170','IR1682175619104','入库区货位编号','进行中','123333','ddd','2023-04-22 23:13:33','ddd','2023-04-22 23:13:48'),('IN1682177244456','IR1682177216835','货位编号3','进行中','','ddd','2023-04-22 23:27:24','ddd','2023-04-22 23:27:32');

/*Table structure for table `location` */

DROP TABLE IF EXISTS `location`;

CREATE TABLE `location` (
  `location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '货位编号',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位名称',
  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位类型',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位状态',
  `storehouse` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属仓库',
  PRIMARY KEY (`location_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='货位列表';

/*Data for the table `location` */

insert  into `location`(`location_id`,`name`,`type`,`status`,`storehouse`) values ('入库区货位编号','入库区货位','入库区','空闲','仓库1'),('出库货位编号1','出库货位1','出库区','空闲','仓库1'),('货位编号1','货位名称1','普通货位','空闲','仓库1'),('货位编号2','货位名称2','普通货位','P1623724983442','仓库2'),('货位编号3','入库区货位2','入库区','P1623724983442','仓库1');

/*Table structure for table `location_type` */

DROP TABLE IF EXISTS `location_type`;

CREATE TABLE `location_type` (
  `id` int NOT NULL COMMENT '序号',
  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='货位类型表单';

/*Data for the table `location_type` */

insert  into `location_type`(`id`,`type`) values (1,'普通货位'),(2,'入库区'),(3,'散货区'),(5,'残次品区'),(6,'退货区'),(7,'出库区');

/*Table structure for table `on_shelves` */

DROP TABLE IF EXISTS `on_shelves`;

CREATE TABLE `on_shelves` (
  `shelves_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '上架单号(ON开头)',
  `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品编号',
  `product_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品名称',
  `location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位编号',
  `location_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位名称',
  `from_location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '源货位编号',
  `from_location_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '源货位名称',
  `count` int DEFAULT NULL COMMENT '数量',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `create_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建时间',
  `check_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '审核人',
  `check_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核时间',
  PRIMARY KEY (`shelves_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='上架管理';

/*Data for the table `on_shelves` */

insert  into `on_shelves`(`shelves_id`,`bar_code`,`product_name`,`location_id`,`location_name`,`from_location_id`,`from_location_name`,`count`,`status`,`create_person`,`create_time`,`check_person`,`check_time`) values ('ON1682176467389','P1623724983442','一','货位编号2','货位名称2','入库区货位编号','入库区货位',1,'已审核','ddd','2023-04-22 23:14:27','ddd','2023-04-22 23:14:33'),('ON1682177280396','P1623724983442','一','货位编号2','货位名称2','货位编号3','入库区货位2',3,'已审核','ddd','2023-04-22 23:28:00','ddd','2023-04-22 23:31:20'),('ON1682177461460','P1623724983442','一','货位编号2','货位名称2','货位编号3','入库区货位2',5,'已审核','ddd','2023-04-22 23:31:01','ddd','2023-04-22 23:31:13');

/*Table structure for table `out_storehouse` */

DROP TABLE IF EXISTS `out_storehouse`;

CREATE TABLE `out_storehouse` (
  `out_storehouse_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '出库单号(OT开头)',
  `picking_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '拣货单号',
  `product_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品名称',
  `location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位',
  `count` int DEFAULT NULL COMMENT '数量',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `receive_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '收件人',
  `addr` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '地址',
  `out_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '出库时间',
  `create_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建时间',
  `check_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核人',
  `check_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核时间',
  `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品条码',
  PRIMARY KEY (`out_storehouse_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='出库订单管理';

/*Data for the table `out_storehouse` */

insert  into `out_storehouse`(`out_storehouse_id`,`picking_id`,`product_name`,`location_id`,`count`,`status`,`receive_person`,`addr`,`out_time`,`create_person`,`create_time`,`check_person`,`check_time`,`bar_code`) values ('OT1682176600901','PI1682176606792','一','货位编号2',1,'已拣货','11','111','','ddd','2023-04-22 23:16:40','ddd','2023-04-22 23:16:46','P1623724983442'),('OT1682177309836','','一','货位编号2',0,'待审核','ss','ss','','','','','','P1623724983442'),('OT1682177509229','PI1682177517407','一','货位编号2',2,'已拣货','2121','121212','','ddd','2023-04-22 23:31:49','ddd','2023-04-22 23:31:57','P1623724983442');

/*Table structure for table `picking` */

DROP TABLE IF EXISTS `picking`;

CREATE TABLE `picking` (
  `picking_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '拣货单号(PI开头)',
  `out_storehouse_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '出库单号(OT开头)',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `recipient_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '领取人',
  `recipient_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '领取时间',
  `create_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`picking_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='拣货任务管理';

/*Data for the table `picking` */

insert  into `picking`(`picking_id`,`out_storehouse_id`,`status`,`recipient_person`,`recipient_time`,`create_person`,`create_time`) values ('PI1682176606792','OT1682176600901','已完成','ddd','2023-04-22 23:17:05','ddd','2023-04-22 23:16:46'),('PI1682177517407','OT1682177509229','已完成','ddd','2023-04-22 23:32:07','ddd','2023-04-22 23:31:57');

/*Table structure for table `product` */

DROP TABLE IF EXISTS `product`;

CREATE TABLE `product` (
  `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '条码(PR开头)',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品名',
  `another_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '别名',
  `value` double DEFAULT NULL COMMENT '价值',
  `net_weight` double DEFAULT NULL COMMENT '净重',
  `rough_weight` double DEFAULT NULL COMMENT '毛重',
  `effective_days` int DEFAULT NULL COMMENT '有效天数',
  `warehouse` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所属仓库名称',
  `remarks` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '备注',
  PRIMARY KEY (`bar_code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='商品表';

/*Data for the table `product` */

insert  into `product`(`bar_code`,`name`,`another_name`,`value`,`net_weight`,`rough_weight`,`effective_days`,`warehouse`,`remarks`) values ('P1623724983442','一','yi',100,50,60,100,'入库仓','///'),('P1623725455184','二','er',30,50,60,100,'二','///'),('P1623725467380','三','san',30,50,60,100,'三','///'),('P1623725471042','四','si',30,50,60,100,'四','///'),('P1623725482024','五','wu',30,50,60,100,'五','///');

/*Table structure for table `purchase` */

DROP TABLE IF EXISTS `purchase`;

CREATE TABLE `purchase` (
  `purchase_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单编号(IP开头)',
  `product` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品',
  `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品id',
  `supplier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '供应商名称',
  `count` int DEFAULT NULL COMMENT '数量',
  `storehouse` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '仓库名称',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`purchase_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='采购订单';

/*Data for the table `purchase` */

insert  into `purchase`(`purchase_id`,`product`,`bar_code`,`supplier`,`count`,`storehouse`,`status`) values ('IP1682175588771','一','P1623724983442','供应商1',1,'仓库1','进行中'),('IP1682176660851','二','P1623725455184','供应商2',100,'仓库1','进行中'),('IP1682176896092','一','P1623724983442','供应商1',10,'仓库1','进行中'),('IP1682177189309','一','P1623724983442','供应商1',100,'仓库1','进行中');

/*Table structure for table `receiving` */

DROP TABLE IF EXISTS `receiving`;

CREATE TABLE `receiving` (
  `receiving_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号(IR开头)',
  `purchase_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '采购单编号',
  `remove_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '调拨单号',
  `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `receiving_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '接货人',
  `receiving_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '接货时间',
  `check_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审批人',
  `check_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审批时间',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`receiving_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='接货管理';

/*Data for the table `receiving` */

insert  into `receiving`(`receiving_id`,`purchase_id`,`remove_id`,`remarks`,`receiving_person`,`receiving_time`,`check_person`,`check_time`,`status`) values ('IR1682175619104','IP1682175588771',NULL,NULL,'ddd','2023-04-22 23:00:19','ddd','2023-04-22 23:00:29','进行中'),('IR1682176688994','IP1682176660851',NULL,NULL,'ddd','2023-04-22 23:18:08','ddd','2023-04-22 23:18:28','已审核'),('IR1682176923585','IP1682176896092',NULL,NULL,'ddd','2023-04-22 23:22:03','ddd','2023-04-22 23:22:21','已审核'),('IR1682177216835','IP1682177189309',NULL,NULL,'ddd','2023-04-22 23:26:56','ddd','2023-04-22 23:27:05','进行中');

/*Table structure for table `remove` */

DROP TABLE IF EXISTS `remove`;

CREATE TABLE `remove` (
  `remove_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '移库单编号(RE开头)',
  `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品编号',
  `product_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品名称',
  `location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位编号',
  `from_location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '源货位编号',
  `count` int DEFAULT NULL COMMENT '数量',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `create_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
  `create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建时间',
  `check_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '审核人',
  `check_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '审核时间',
  PRIMARY KEY (`remove_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='移库管理';

/*Data for the table `remove` */

/*Table structure for table `rights` */

DROP TABLE IF EXISTS `rights`;

CREATE TABLE `rights` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '序号',
  `name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '选项名',
  `parent_id` int DEFAULT NULL COMMENT '父id',
  `path` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'url路径',
  `level` int DEFAULT NULL COMMENT '选项等级',
  `created` datetime DEFAULT NULL COMMENT '创建时间',
  `updated` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='功能列表';

/*Data for the table `rights` */

insert  into `rights`(`id`,`name`,`parent_id`,`path`,`level`,`created`,`updated`) values (1,'基础资料',0,NULL,1,'2021-06-08 19:23:53','2021-06-08 19:23:56'),(2,'产品管理',1,'/product',2,'2021-06-08 19:24:36','2021-06-08 19:24:38'),(3,'仓库管理',1,'/storehouse',2,'2021-06-08 19:25:28','2021-06-08 19:25:30'),(4,'供应商',1,'/supplier',2,'2021-06-08 19:26:13','2021-06-08 19:26:15'),(5,'库位管理',1,'/location',2,'2021-06-08 19:26:47','2021-06-08 19:26:50'),(6,'入库管理',0,'',1,'2021-06-08 19:27:14','2021-06-08 19:27:16'),(7,'采购订单',6,'/order',2,'2021-06-08 19:28:01','2021-06-08 19:28:04'),(8,'接货',6,'/receiving',2,'2021-06-08 19:28:41','2021-06-08 19:28:43'),(9,'接货管理',6,'/receivingManagement',2,'2021-06-08 19:30:57','2021-06-08 19:30:59'),(10,'入库',6,'/putIn',2,'2021-06-08 19:31:49','2021-06-08 19:31:51'),(11,'入库管理',6,'/putInManagement',2,'2021-06-08 19:32:23','2021-06-08 19:32:25'),(12,'库内管理',0,'',1,'2021-06-08 19:35:17','2021-06-08 19:35:19'),(13,'上架',12,'/shelves',2,'2021-06-08 19:36:21','2021-06-08 19:36:22'),(14,'上架管理',12,'/shelvesManagement',2,'2021-06-08 19:37:13','2021-06-08 19:37:15'),(15,'移库',12,'/remove',2,'2021-06-08 19:37:36','2021-06-08 19:37:38'),(16,'移库管理',12,'/removeManagement',2,'2021-06-08 19:38:00','2021-06-08 19:38:03'),(19,'库存管理',0,'',1,'2021-06-08 19:45:32','2021-06-08 19:45:35'),(20,'库存管理',19,'/stock',2,'2021-06-08 19:47:47','2021-06-08 19:47:50'),(21,'出库管理',0,'',1,'2021-06-08 19:48:25','2021-06-08 19:48:27'),(22,'出库订单',21,'/outOrder',2,'2021-06-08 19:50:24','2021-06-08 19:50:29'),(24,'拣货',21,'/pick',2,'2021-06-08 19:59:03','2021-06-08 19:59:06'),(25,'拣货管理',21,'/pickManagement',2,'2021-06-08 19:59:54','2021-06-08 19:59:56');

/*Table structure for table `stock` */

DROP TABLE IF EXISTS `stock`;

CREATE TABLE `stock` (
  `in_storehouse_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据来源单号',
  `location_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '货位编号',
  `location_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '货位名称',
  `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品编码',
  `product_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品名称',
  `total_quantity` int DEFAULT NULL COMMENT '总数量',
  `available_quantity` int DEFAULT NULL COMMENT '可用数量',
  `locked_quantity` int DEFAULT NULL COMMENT '锁定数量',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`location_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='库存';

/*Data for the table `stock` */

insert  into `stock`(`in_storehouse_id`,`location_id`,`location_name`,`bar_code`,`product_name`,`total_quantity`,`available_quantity`,`locked_quantity`,`status`) values ('IN1682176413170','货位编号2','货位名称2','P1623724983442','一',8,6,3,'已上架'),('IN1682177244456','货位编号3','入库区货位2','P1623724983442','一',100,92,8,'待上架');

/*Table structure for table `storehouse` */

DROP TABLE IF EXISTS `storehouse`;

CREATE TABLE `storehouse` (
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '仓库名称',
  `simple_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '仓库简称',
  `addr` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '仓库地址',
  `remarks` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '备注',
  PRIMARY KEY (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='仓库列表';

/*Data for the table `storehouse` */

insert  into `storehouse`(`name`,`simple_name`,`addr`,`remarks`) values ('仓库1','ck1','仓库1的地址',''),('仓库2','ck2','仓库2的地址','仓库2的地址');

/*Table structure for table `supplier` */

DROP TABLE IF EXISTS `supplier`;

CREATE TABLE `supplier` (
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '供应商名称',
  `contacts` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '联系人',
  `number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电话',
  `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '注释',
  PRIMARY KEY (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='供应商列表';

/*Data for the table `supplier` */

insert  into `supplier`(`name`,`contacts`,`number`,`remarks`) values ('供应商1','联系人1','15097329653','供应商1'),('供应商2','联系人2','15097329653','供应商2');

/*Table structure for table `user` */

DROP TABLE IF EXISTS `user`;

CREATE TABLE `user` (
  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
  `username` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户姓名',
  `password` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密码',
  `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '电话',
  `email` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮箱',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='用户列表';

/*Data for the table `user` */

insert  into `user`(`id`,`username`,`password`,`phone`,`email`,`status`) values ('','ddd','77963b7a931377ad4ab5ad6a9cd718aa',NULL,NULL,NULL);

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
