SET FOREIGN_KEY_CHECKS=0;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_post` (
        `post_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
        `post_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位编码',
        `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
        `post_sort` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
        `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态（0停用 1正常）',
        `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
        `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
        `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
        `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间',
        `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
        PRIMARY KEY (`post_id`) USING BTREE
    ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位信息表' ROW_FORMAT = Dynamic;

DELETE FROM `omc_db`.`sys_post` WHERE `post_id` in (1,2,3,4,5);

INSERT IGNORE INTO
    `omc_db`.`sys_post` (
        `post_id`,
        `post_code`,
        `post_name`,
        `post_sort`,
        `status`,
        `create_by`,
        `create_time`,
        `update_by`,
        `update_time`,
        `remark`
    )
VALUES (
        1,
        'Administrator',
        '管理人员',
        1,
        '1',
        'admin',
        1697110106499,
        'admin',
        1698487012626,
        ''
    );

INSERT IGNORE INTO
    `omc_db`.`sys_post` (
        `post_id`,
        `post_code`,
        `post_name`,
        `post_sort`,
        `status`,
        `create_by`,
        `create_time`,
        `update_by`,
        `update_time`,
        `remark`
    )
VALUES (
        2,
        'Operator',
        '运维人员',
        2,
        '1',
        'admin',
        1697110106502,
        'admin',
        1698487019898,
        ''
    );

INSERT IGNORE INTO
    `omc_db`.`sys_post` (
        `post_id`,
        `post_code`,
        `post_name`,
        `post_sort`,
        `status`,
        `create_by`,
        `create_time`,
        `update_by`,
        `update_time`,
        `remark`
    )
VALUES (
        3,
        'Monitor',
        '监控人员',
        3,
        '1',
        'admin',
        1697110106504,
        'admin',
        1698487031259,
        ''
    );

INSERT IGNORE INTO
    `omc_db`.`sys_post` (
        `post_id`,
        `post_code`,
        `post_name`,
        `post_sort`,
        `status`,
        `create_by`,
        `create_time`,
        `update_by`,
        `update_time`,
        `remark`
    )
VALUES (
        4,
        'Visitor',
        '普通用户',
        4,
        '1',
        'admin',
        1697110106507,
        'admin',
        1698487043293,
        ''
    );

SET FOREIGN_KEY_CHECKS=1;