--
-- Table structure for table `sys_post`
--
CREATE TABLE IF NOT EXISTS `sys_post` (
  `post_id` bigint NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
  `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位编码',
  `post_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
  `post_sort` int NULL DEFAULT 0 COMMENT '显示顺序',
  `status_flag` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态（0停用 1正常）',
  `del_flag` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标记（0存在 1删除）',
  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` bigint NULL DEFAULT 0 COMMENT '创建时间',
  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` bigint NULL DEFAULT 0 COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  PRIMARY KEY (`post_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统_岗位信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- COLUMN for sys_post
-- ----------------------------
ALTER TABLE `sys_post` DROP COLUMN `status`;
ALTER TABLE `sys_post` MODIFY COLUMN `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位编码' AFTER `post_id`;
ALTER TABLE `sys_post` MODIFY COLUMN `post_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称' AFTER `post_code`;
ALTER TABLE `sys_post` ADD COLUMN `status_flag` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态（0停用 1正常）' AFTER `post_sort`;
ALTER TABLE `sys_post` ADD COLUMN `del_flag` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标记（0存在 1删除）' AFTER `status_flag`;
ALTER TABLE `sys_post` MODIFY COLUMN `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者' AFTER `del_flag`;
ALTER TABLE `sys_post` MODIFY COLUMN `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者' AFTER `create_time`;
ALTER TABLE `sys_post` MODIFY COLUMN `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注' AFTER `update_time`;
ALTER TABLE `sys_post` COMMENT = '系统_岗位信息表';

-- ----------------------------
-- Data for sys_post
-- ----------------------------
INSERT IGNORE INTO `sys_post` VALUES (1, 'administator', 'post.admin', 1, '1', '0', 'system', 1697110106499, '', 0, '');
INSERT IGNORE INTO `sys_post` VALUES (2, 'operator', 'post.operator', 2, '1', '0', 'system', 1697110106499, '', 0, '');
INSERT IGNORE INTO `sys_post` VALUES (3, 'monitor', 'post.monitor', 3, '1', '0', 'system', 1697110106499, '', 0, '');
INSERT IGNORE INTO `sys_post` VALUES (4, 'visitor', 'post.visitor', 4, '1', '0', 'system', 1697110106499, '', 0, '');
UPDATE `sys_post` SET `status_flag` = '1' WHERE `post_id` in (1,2,3,4);

UNLOCK TABLES;

-- Dump completed on 2025-02-14 15:26:56
