/*
 Navicat Premium Data Transfer

 Source Server         : 139.199.2.142视频分享
 Source Server Type    : MySQL
 Source Server Version : 80026
 Source Host           : 139.199.2.142:3306
 Source Schema         : share_videos

 Target Server Type    : MySQL
 Target Server Version : 80026
 File Encoding         : 65001

 Date: 05/02/2024 17:43:37
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for authorization_notice
-- ----------------------------
DROP TABLE IF EXISTS `authorization_notice`;
CREATE TABLE `authorization_notice`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `video_share_id` bigint(0) NOT NULL COMMENT '视频授权ID',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for authorization_status
-- ----------------------------
DROP TABLE IF EXISTS `authorization_status`;
CREATE TABLE `authorization_status`  (
  `id` bigint(0) NOT NULL COMMENT '主键ID',
  `status_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '状态名称',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sms_code
-- ----------------------------
DROP TABLE IF EXISTS `sms_code`;
CREATE TABLE `sms_code`  (
  `id` bigint(0) NOT NULL COMMENT '主键ID',
  `phone_number` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '手机号',
  `code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '短信验证码',
  `expiration_time` datetime(0) NOT NULL COMMENT '失效时间',
  `is_verify` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否验证 0 未验证 1 已验证',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for system_authority
-- ----------------------------
DROP TABLE IF EXISTS `system_authority`;
CREATE TABLE `system_authority`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `role_id` bigint(0) NOT NULL COMMENT '角色ID',
  `menu_id` bigint(0) NOT NULL COMMENT '菜单ID',
  `is_create` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否新增 0 未拥有该权限 1 拥有该权限',
  `is_delete` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否删除 0 未拥有该权限 1 拥有该权限',
  `is_update` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否编辑 0 未拥有该权限 1 拥有该权限',
  `is_read` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '是否查看 0 未拥有该权限 1 拥有该权限',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for system_menu
-- ----------------------------
DROP TABLE IF EXISTS `system_menu`;
CREATE TABLE `system_menu`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `menu_parent_id` bigint(0) NOT NULL COMMENT '上级菜单ID',
  `menu_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `menu_name_unique_index`(`menu_name`) USING BTREE COMMENT '菜单名称'
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for system_role
-- ----------------------------
DROP TABLE IF EXISTS `system_role`;
CREATE TABLE `system_role`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `role_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `role_name_unique_index`(`role_name`) USING BTREE COMMENT '角色名称'
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for system_user
-- ----------------------------
DROP TABLE IF EXISTS `system_user`;
CREATE TABLE `system_user`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `role_id` bigint(0) NULL DEFAULT NULL COMMENT '角色ID',
  `account_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账户名',
  `account_number` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账户',
  `gender` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '性别 1：女生  2：男生',
  `account_password` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账户密码',
  `phone_number` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `wechat_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信ID',
  `email` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱账号',
  `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记  0：不删除 1：删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `account_number_unique_index`(`account_number`) USING BTREE COMMENT '账户',
  INDEX `account_name_index`(`account_name`) USING BTREE COMMENT '账户名'
) ENGINE = InnoDB AUTO_INCREMENT = 1875 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for video
-- ----------------------------
DROP TABLE IF EXISTS `video`;
CREATE TABLE `video`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `video_category_id` bigint(0) NOT NULL COMMENT '视频类别ID',
  `video_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '视频名称',
  `video_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '视频链接',
  `video_description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '视频说明',
  `video_duration` bigint(0) NOT NULL COMMENT '视频时长',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  `picture_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '视频封面图片路径',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `video_url_unique_index`(`video_url`) USING BTREE COMMENT '视频链接',
  INDEX `video_name_index`(`video_name`) USING BTREE COMMENT '视频名称'
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for video_category
-- ----------------------------
DROP TABLE IF EXISTS `video_category`;
CREATE TABLE `video_category`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `category_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类别名称',
  `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `category_name_unique_index`(`category_name`) USING BTREE COMMENT '类别名称'
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for video_else
-- ----------------------------
DROP TABLE IF EXISTS `video_else`;
CREATE TABLE `video_else`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `video_id` bigint(0) NOT NULL COMMENT '视频ID',
  `video_eles_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件下载路径',
  `video_eles_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件下载名称',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `video_url_unique_index`(`video_eles_url`) USING BTREE COMMENT '文件下载路径',
  INDEX `video_name_index`(`video_eles_name`) USING BTREE COMMENT '文件下载名称'
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for video_play
-- ----------------------------
DROP TABLE IF EXISTS `video_play`;
CREATE TABLE `video_play`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `video_share_id` bigint(0) NOT NULL COMMENT '视频分享ID',
  `user_id` bigint(0) NOT NULL COMMENT '用户ID',
  `video_share_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '视频链接',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for video_share
-- ----------------------------
DROP TABLE IF EXISTS `video_share`;
CREATE TABLE `video_share`  (
  `id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `video_id` bigint(0) NOT NULL COMMENT '视频ID',
  `user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户ID',
  `authorized_person` bigint(0) NOT NULL COMMENT '授权审批人ID',
  `authorized_status_id` bigint(0) NOT NULL COMMENT '授权状态ID',
  `video_share_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '视频分享链接',
  `apply_video_play_time` int(0) NOT NULL COMMENT '申请的视频播放次数',
  `permit_video_play_time` int(0) NOT NULL COMMENT '通过的视频播放次数',
  `authorized_descript` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '授权说明',
  `create_time` datetime(0) NOT NULL COMMENT '创建时间',
  `update_time` datetime(0) NOT NULL COMMENT '更新时间',
  `create_user` bigint(0) NOT NULL COMMENT '创建人员',
  `update_user` bigint(0) NOT NULL COMMENT '更新人员',
  `deleted` bigint(0) NOT NULL COMMENT '逻辑删除标记',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
