
-- ----------------------------
-- 学员表
-- ----------------------------
CREATE TABLE `train_exam`.`ex_student`  (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`company_id` bigint(20) NOT NULL COMMENT '企业id',
`empno` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号',
`password` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '姓名',
`status` tinyint NOT NULL DEFAULT 0 COMMENT '账号状态(0正常，1停用，默认0)',
`sex` tinyint NOT NULL DEFAULT 2 COMMENT '用户性别(0男，1女，2未知，默认2)',
`phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号',
`id_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '身份证号',
`post` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作岗位',
`del_flag` tinyint NULL DEFAULT 0 COMMENT '删除标志(0代表存在，1代表删除，默认0)',
`duty` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职务',
`create_id` bigint(20) NOT NULL COMMENT '创建的管理员用户id',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
`remark` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`version` int NULL DEFAULT 0 COMMENT '乐观锁',
`login_ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录ip',
`login_date` datetime NULL DEFAULT NULL COMMENT '登录时间',
`pwd_update_date` datetime NULL DEFAULT NULL COMMENT '密码更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '学员表' ROW_FORMAT = Dynamic;
