USE `cnbg_20240511_001`;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_user_drug
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_drug`;
CREATE TABLE `sys_user_drug`
(
    `record_id`   INT UNSIGNED AUTO_INCREMENT NOT NULL COMMENT '信息',
    `user_id`     INT                         NOT NULL COMMENT '用户ID',
    `drug_id`     INT                         NOT NULL COMMENT '药品ID',
    `create_by`   VARCHAR(64)                 NOT NULL COMMENT '创建人',
    `create_time` DATETIME                    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    PRIMARY KEY `pk_id` (`record_id`) USING BTREE,
    UNIQUE KEY `uk_uid_dgId` (`user_id`, `drug_id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_general_ci
  ROW_FORMAT = DYNAMIC COMMENT ='管理员可见药品';


-- ----------------------------
-- Records of sys_user_drug
-- ----------------------------
BEGIN;
COMMIT;


SET FOREIGN_KEY_CHECKS = 1;
