/*
 Navicat MySQL Data Transfer

 Source Server         : 本地
 Source Server Type    : MySQL
 Source Server Version : 50740 (5.7.40-log)
 Source Host           : localhost:3306
 Source Schema         : zhongbuzhanqu

 Target Server Type    : MySQL
 Target Server Version : 50740 (5.7.40-log)
 File Encoding         : 65001

 Date: 25/08/2025 17:06:04
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for account_book
-- ----------------------------
DROP TABLE IF EXISTS `account_book`;
CREATE TABLE `account_book`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `operator` int(11) NULL DEFAULT NULL COMMENT '操作人',
  `reviewer` int(11) NULL DEFAULT NULL COMMENT '审核人',
  `date` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期',
  `drug_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '药品id',
  `eff_date` date NULL DEFAULT NULL COMMENT '效期',
  `manu_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次',
  `invoice_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处方号',
  `manu_quantity` int(11) NULL DEFAULT NULL COMMENT '批次数量',
  `total_quantity` int(11) NULL DEFAULT NULL COMMENT '药品总数量',
  `opera_quantity` int(11) NULL DEFAULT NULL COMMENT '操作数量',
  `type` int(2) NULL DEFAULT NULL COMMENT '操作类型1入库2出库3还药4盘点',
  `machine_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备id',
  `insert_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `add_quantity` int(11) NULL DEFAULT NULL COMMENT '数量',
  `out_quantity` int(11) NULL DEFAULT NULL COMMENT '出库数量',
  `create_time` datetime NULL DEFAULT NULL,
  `yesterday_quantity` int(11) NULL DEFAULT NULL,
  `manu_stock` int(11) NULL DEFAULT NULL COMMENT '抽屉号',
  `total_stock` int(11) NULL DEFAULT NULL,
  `department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '取药科室',
  `create_date` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
