代码拉取完成,页面将自动刷新
CREATE TABLE user (
user_id BIGINT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(128) NOT NULL UNIQUE,
nickname VARCHAR(128) NOT NULL,
password VARCHAR(128) NOT NULL,
createAt BIGINT NOT NULL,
token VARCHAR(128),
avatar VARCHAR(256),
signature VARCHAR(256)
);
INSERT INTO user (username, nickname, password, createAt, token, avatar, signature) VALUES
('user1', '小明', 'password1', 1628822400, 'token1', 'avatar1.jpg', '个性签名1'),
('user2', '小红', 'password2', 1628822401, 'token2', 'avatar2.jpg', '个性签名2'),
('user3', '小李', 'password3', 1628822402, 'token3', 'avatar3.jpg', '个性签名3'),
('user4', '小王', 'password4', 1628822403, 'token4', 'avatar4.jpg', '个性签名4'),
('user5', '小张', 'password5', 1628822404, 'token5', 'avatar5.jpg', '个性签名5'),
('user6', '小赵', 'password6', 1628822405, 'token6', 'avatar6.jpg', '个性签名6'),
('user7', '小钱', 'password7', 1628822406, 'token7', 'avatar7.jpg', '个性签名7'),
('user8', '小孙', 'password8', 1628822407, 'token8', 'avatar8.jpg', '个性签名8'),
('user9', '小周', 'password9', 1628822408, 'token9', 'avatar9.jpg', '个性签名9'),
('user10', '小吴', 'password10', 1628822409, 'token10', 'avatar10.jpg', '个性签名10'),
('user11', '小郑', 'password11', 1628822410, 'token11', 'avatar11.jpg', '个性签名11'),
('user12', '小冯', 'password12', 1628822411, 'token12', 'avatar12.jpg', '个性签名12'),
('user13', '小陈', 'password13', 1628822412, 'token13', 'avatar13.jpg', '个性签名13'),
('user14', '小褚', 'password14', 1628822413, 'token14', 'avatar14.jpg', '个性签名14'),
('user15', '小卫', 'password15', 1628822414, 'token15', 'avatar15.jpg', '个性签名15'),
('user16', '小蒋', 'password16', 1628822415, 'token16', 'avatar16.jpg', '个性签名16'),
('user17', '小沈', 'password17', 1628822416, 'token17', 'avatar17.jpg', '个性签名17'),
('user18', '小韩', 'password18', 1628822417, 'token18', 'avatar18.jpg', '个性签名18'),
('user19', '小杨', 'password19', 1628822418, 'token19', 'avatar19.jpg', '个性签名19'),
('user20', '小朱', 'password20', 1628822419, 'token20', 'avatar20.jpg', '个性签名20');
INSERT INTO user (userId, username, password, register_time, token, avatar, signature, nickname)
VALUES (1001, 'john.doe', 'password123', 1632556800, 'abcdefg123456', 'https://example.com/avatar.jpg', 'Hello, I am John Doe', 'john');
INSERT INTO user (userId, username, password, register_time, token, avatar, signature, nickname)
VALUES (1005, 'xxttsssss', 'password123', 1632556800, 'abcdefg123456', 'https://example.com/avatar.jpg', 'Hello, I am John Doe', 'ssssssss');
CREATE TABLE userCount (
user_id BIGINT PRIMARY KEY AUTO_INCREMENT,
create_at BIGINT NOT NULL,
follow_count BIGINT,
follower_count BIGINT,
favorite_count BIGINT,
work_count BIGINT
);
INSERT INTO userCount (create_at, follow_count, follower_count, favorite_count, work_count) VALUES
(1628822400, 100, 50, 20, 50),
(1628822401, 200, 150, 30, 70),
(1628822402, 300, 200, 40, 90),
(1628822403, 400, 250, 50, 110),
(1628822404, 500, 300, 60, 130),
(1628822405, 600, 350, 70, 150),
(1628822406, 700, 400, 80, 170),
(1628822407, 800, 450, 90, 190),
(1628822408, 900, 500, 100, 210),
(1628822409, 1000, 550, 110, 230),
(1628822410, 1100, 600, 120, 250),
(1628822411, 1200, 650, 130, 270),
(1628822412, 1300, 700, 140, 290),
(1628822413, 1400, 750, 150, 310),
(1628822414, 1500, 800, 160, 330),
(1628822415, 1600, 850, 170, 350),
(1628822416, 1700, 900, 180, 370),
(1628822417, 1800, 950, 190, 390),
(1628822418, 1900, 1000, 200, 410),
(1628822419, 2000, 1050, 210, 430);
INSERT INTO userCount (user_id, create_at, follow_count, follower_count, favorite_count, work_count) VALUES (1005, 1632556800, 500, 1000, 200, 50);
CREATE TABLE userPreference (
user_id BIGINT PRIMARY KEY AUTO_INCREMENT,
create_at BIGINT,
tag1 DOUBLE,
tag2 DOUBLE,
tag3 DOUBLE,
tag4 DOUBLE,
tag5 DOUBLE,
tag6 DOUBLE,
tag7 DOUBLE,
tag8 DOUBLE,
tag9 DOUBLE,
tag10 DOUBLE
);
INSERT INTO userPreference (create_at, tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10) VALUES
(1628822400, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822401, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822402, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822403, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822404, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822405, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822406, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822407, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822408, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822409, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822410, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822411, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822412, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822413, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822414, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822415, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822416, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822417, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822418, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND()),
(1628822419, RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND(), RAND());
INSERT INTO userPreference (userId, createAt, tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8, tag9, tag10)
VALUES (1, 1632556800, 0.8, 0.5, 0.7, 0.3, 0.9, 0.6, 0.4, 0.2, 1.0, 0.8);
CREATE TABLE video (
video_id BIGINT PRIMARY KEY AUTO_INCREMENT,
create_at BIGINT,
user_id BIGINT NOT NULL,
title VARCHAR(128),
description VARCHAR(256),
crypto_title VARCHAR(128) NOT NULL,
video_url VARCHAR(256) NOT NULL,
type VARCHAR(10) NOT NULL
);
INSERT INTO video (create_at, user_id, title, description, crypto_title, video_url, type) VALUES
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 1', 'Video Description 1', 'Crypto Title 1', 'http://s36ds48k7.hn-bkt.clouddn.com/07', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 2', 'Video Description 2', 'Crypto Title 2', 'http://s36ds48k7.hn-bkt.clouddn.com/09', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 3', 'Video Description 3', 'Crypto Title 3', 'http://s36ds48k7.hn-bkt.clouddn.com/1233_12344455', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 4', 'Video Description 4', 'Crypto Title 4', 'http://s36ds48k7.hn-bkt.clouddn.com/54', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 5', 'Video Description 5', 'Crypto Title 5', 'http://s36ds48k7.hn-bkt.clouddn.com/55', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 6', 'Video Description 6', 'Crypto Title 6', 'http://s36ds48k7.hn-bkt.clouddn.com/56', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 7', 'Video Description 7', 'Crypto Title 7', 'http://s36ds48k7.hn-bkt.clouddn.com/57', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 8', 'Video Description 8', 'Crypto Title 8', 'http://s36ds48k7.hn-bkt.clouddn.com/58', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 9', 'Video Description 9', 'Crypto Title 9', 'http://s36ds48k7.hn-bkt.clouddn.com/59', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 10', 'Video Description 10', 'Crypto Title 10', 'http://s36ds48k7.hn-bkt.clouddn.com/6', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 11', 'Video Description 11', 'Crypto Title 11', 'http://s36ds48k7.hn-bkt.clouddn.com/60', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 12', 'Video Description 12', 'Crypto Title 12', 'http://s36ds48k7.hn-bkt.clouddn.com/62', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 13', 'Video Description 13', 'Crypto Title 13', 'http://s36ds48k7.hn-bkt.clouddn.com/63', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 14', 'Video Description 14', 'Crypto Title 14', 'http://s36ds48k7.hn-bkt.clouddn.com/64', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 15', 'Video Description 15', 'Crypto Title 15', 'http://s36ds48k7.hn-bkt.clouddn.com/65', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 16', 'Video Description 16', 'Crypto Title 16', 'http://s36ds48k7.hn-bkt.clouddn.com/66', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 17', 'Video Description 17', 'Crypto Title 17', 'http://s36ds48k7.hn-bkt.clouddn.com/67', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 18', 'Video Description 18', 'Crypto Title 18', 'http://s36ds48k7.hn-bkt.clouddn.com/68', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 19', 'Video Description 19', 'Crypto Title 19', 'http://s36ds48k7.hn-bkt.clouddn.com/69', '1000000000'),
(UNIX_TIMESTAMP(NOW()), RAND() * 20, 'Video Title 20', 'Video Description 20', 'Crypto Title 20', 'http://s36ds48k7.hn-bkt.clouddn.com/7', '1000000000');
INSERT INTO video (video_id, create_at, user_id, title, description, crypto_title, type)
VALUES (15, 1632556800, 1010, '视频标题', '舞蹈视频', 61, '0000000001');
INSERT INTO videoCount (video_id, create_at, favorite_count, comment_count, share_count)
VALUES (15, 1632556800, 100, 50, 20);
INSERT INTO video (video_id, create_at, user_id, title, description, crypto_title, type)
VALUES (2, 1632556800, 1001, '视频标题', '视频简介', '加密标题', '0000000001');
CREATE TABLE videoCount (
videoId BIGINT PRIMARY KEY AUTO_INCREMENT,
createAt BIGINT,
favoriteCount BIGINT,
commentCount BIGINT,
shareCount BIGINT
);
INSERT INTO videoCount (createAt, favoriteCount, commentCount, shareCount) VALUES
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100),
(UNIX_TIMESTAMP(NOW()), RAND() * 100, RAND() * 100, RAND() * 100);
INSERT INTO videoCount (videoId, createAt, favoriteCount, commentCount, shareCount)
VALUES (1, 1632556800, 100, 50, 20);
CREATE TABLE follow (
relation_id BIGINT PRIMARY KEY AUTO_INCREMENT,
create_at BIGINT,
user_id BIGINT NOT NULL,
target_id BIGINT NOT NULL,
INDEX userId_targetId (user_id, target_id)
);
INSERT INTO follow (create_at, user_id, target_id)
VALUES (UNIX_TIMESTAMP(), 7, 12),
(UNIX_TIMESTAMP(), 1, 9),
(UNIX_TIMESTAMP(), 18, 5),
(UNIX_TIMESTAMP(), 3, 8),
(UNIX_TIMESTAMP(), 13, 10),
(UNIX_TIMESTAMP(), 6, 4),
(UNIX_TIMESTAMP(), 15, 11),
(UNIX_TIMESTAMP(), 2, 19),
(UNIX_TIMESTAMP(), 14, 16),
(UNIX_TIMESTAMP(), 20, 17),
(UNIX_TIMESTAMP(), 16, 3),
(UNIX_TIMESTAMP(), 19, 6),
(UNIX_TIMESTAMP(), 5, 7),
(UNIX_TIMESTAMP(), 9, 20),
(UNIX_TIMESTAMP(), 4, 2),
(UNIX_TIMESTAMP(), 11, 13),
(UNIX_TIMESTAMP(), 10, 1),
(UNIX_TIMESTAMP(), 12, 14),
(UNIX_TIMESTAMP(), 8, 15),
(UNIX_TIMESTAMP(), 17, 18);
INSERT INTO relation (relation_id, create_at, user_id, target_id)
VALUES (5, 1632556800, 1003, 1005);
CREATE TABLE favorite (
favorite_id BIGINT PRIMARY KEY AUTO_INCREMENT,
create_at BIGINT,
user_id BIGINT NOT NULL,
video_id BIGINT NOT NULL,
INDEX userId_videoId (user_id, video_id)
);
CREATE TABLE collect (
favorite_id BIGINT PRIMARY KEY AUTO_INCREMENT,
create_at BIGINT,
user_id BIGINT NOT NULL,
video_id BIGINT NOT NULL,
INDEX userId_videoId (user_id, video_id)
);
INSERT INTO collect (create_at, user_id, video_id)
VALUES (UNIX_TIMESTAMP(), 14, 19),
(UNIX_TIMESTAMP(), 3, 4),
(UNIX_TIMESTAMP(), 10, 17),
(UNIX_TIMESTAMP(), 6, 8),
(UNIX_TIMESTAMP(), 1, 3),
(UNIX_TIMESTAMP(), 18, 7),
(UNIX_TIMESTAMP(), 5, 6),
(UNIX_TIMESTAMP(), 15, 16),
(UNIX_TIMESTAMP(), 11, 9),
(UNIX_TIMESTAMP(), 13, 10),
(UNIX_TIMESTAMP(), 8, 5),
(UNIX_TIMESTAMP(), 19, 18),
(UNIX_TIMESTAMP(), 16, 14),
(UNIX_TIMESTAMP(), 2, 11),
(UNIX_TIMESTAMP(), 20, 2),
(UNIX_TIMESTAMP(), 9, 1),
(UNIX_TIMESTAMP(), 12, 12),
(UNIX_TIMESTAMP(), 7, 20),
(UNIX_TIMESTAMP(), 4, 15),
(UNIX_TIMESTAMP(), 17, 13);
INSERT INTO favorite (favoriteId, createAt, userId, videoId)
VALUES (1, 1632556800, 1001, 2001);
INSERT INTO favorite (favorite_id, create_at, user_id, video_id)
VALUES (5, 1632556800, 1005, 17);
CREATE TABLE comment (
comment_id BIGINT PRIMARY KEY AUTO_INCREMENT,
create_at BIGINT,
video_id BIGINT NOT NULL,
parent_comment_id BIGINT,
user_id BIGINT NOT NULL,
content TEXT,
INDEX pcomment_id (parent_comment_id),
INDEX videoId_parentCommentId (video_id, parent_comment_id)
);
INSERT INTO comment (comment_id, create_at, video_id, parent_comment_id, user_id, content)
VALUES (4, 1632556800, 18, NULL, 1003, 'defefeff');
INSERT INTO comment (create_at, video_id, parent_comment_id, user_id, content)
VALUES (UNIX_TIMESTAMP(), 10, NULL, 5, '这个视频很好看!'),
(UNIX_TIMESTAMP(), 4, NULL, 16, '我喜欢这个视频的内容!'),
(UNIX_TIMESTAMP(), 17, NULL, 2, '很有趣的视频!'),
(UNIX_TIMESTAMP(), 12, NULL, 14, '这个视频讲解得很清晰!'),
(UNIX_TIMESTAMP(), 8, NULL, 7, '我觉得这个视频有点无聊...'),
(UNIX_TIMESTAMP(), 19, NULL, 9, '非常喜欢这个视频的风格!'),
(UNIX_TIMESTAMP(), 3, NULL, 18, '这个视频的画面效果很棒!'),
(UNIX_TIMESTAMP(), 7, NULL, 1, '视频内容很有启发性!'),
(UNIX_TIMESTAMP(), 15, NULL, 20, '我被这个视频吸引住了!'),
(UNIX_TIMESTAMP(), 13, NULL, 11, '这个视频的配乐很好听!'),
(UNIX_TIMESTAMP(), 5, NULL, 8, '视频内容有点晦涩难懂...'),
(UNIX_TIMESTAMP(), 18, NULL, 6, '这个视频是我最喜欢的!'),
(UNIX_TIMESTAMP(), 14, NULL, 15, '视频的剧情非常吸引人!'),
(UNIX_TIMESTAMP(), 11, NULL, 3, '这个视频值得一看!'),
(UNIX_TIMESTAMP(), 2, NULL, 19, '推荐给大家!'),
(UNIX_TIMESTAMP(), 1, 3, 12, '视频拍摄得很精美!'),
(UNIX_TIMESTAMP(), 20, NULL, 4, '有没有人对这个视频感同身受?'),
(UNIX_TIMESTAMP(), 6, 2, 17, '这个视频很搞笑!'),
(UNIX_TIMESTAMP(), 16, 1, 13, '可以学到很多知识的视频!'),
(UNIX_TIMESTAMP(), 9, NULL, 10, '这个视频的讲述方式很有趣!');
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。