diff --git a/server/SQL/V1_init_seq.sql b/server/SQL/V1_init_seq.sql new file mode 100644 index 0000000..0317cc6 --- /dev/null +++ b/server/SQL/V1_init_seq.sql @@ -0,0 +1,27 @@ +CREATE SEQUENCE ai_profiles_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +CREATE SEQUENCE chat_records_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +CREATE SEQUENCE image_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +CREATE SEQUENCE users_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; diff --git a/server/SQL/V2_init_ai_profiles.sql b/server/SQL/V2_init_ai_profiles.sql new file mode 100644 index 0000000..eefad44 --- /dev/null +++ b/server/SQL/V2_init_ai_profiles.sql @@ -0,0 +1,43 @@ +/* + Navicat Premium Dump SQL + + Source Server : ai + Source Server Type : PostgreSQL + Source Server Version : 150012 (150012) + Source Host : localhost:5432 + Source Catalog : ktor + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 150012 (150012) + File Encoding : 65001 + + Date: 07/05/2025 15:10:52 +*/ + + +-- ---------------------------- +-- Table structure for ai_profiles +-- ---------------------------- +DROP TABLE IF EXISTS "public"."ai_profiles"; +CREATE TABLE "public"."ai_profiles" ( + "id" int4 NOT NULL DEFAULT nextval('ai_profiles_id_seq'::regclass), + "name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL, + "avatar_url" varchar(255) COLLATE "pg_catalog"."default", + "ai_personality" json NOT NULL, + "memory_enabled" bool NOT NULL DEFAULT true, + "creation_date" timestamp(6) NOT NULL, + "is_active" bool NOT NULL DEFAULT true +) +; + +-- ---------------------------- +-- Records of ai_profiles +-- ---------------------------- +INSERT INTO "public"."ai_profiles" VALUES (0, '璃', '/avatar/wall.png', '{"gender": "woman"}', 't', '2024-12-09 21:59:23', 't'); +INSERT INTO "public"."ai_profiles" VALUES (1, '泷', '/avatar/wall.png', '{"gender": "man"}', 't', '2024-12-09 21:59:23', 't'); + +-- ---------------------------- +-- Primary Key structure for table ai_profiles +-- ---------------------------- +ALTER TABLE "public"."ai_profiles" ADD CONSTRAINT "ai_profiles_pkey" PRIMARY KEY ("id"); diff --git a/server/SQL/V3_init_chat_records.sql b/server/SQL/V3_init_chat_records.sql new file mode 100644 index 0000000..28fe75b --- /dev/null +++ b/server/SQL/V3_init_chat_records.sql @@ -0,0 +1,103 @@ +/* + Navicat Premium Dump SQL + + Source Server : ai + Source Server Type : PostgreSQL + Source Server Version : 150012 (150012) + Source Host : localhost:5432 + Source Catalog : ktor + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 150012 (150012) + File Encoding : 65001 + + Date: 07/05/2025 15:11:41 +*/ + + +-- ---------------------------- +-- Table structure for chat_records +-- ---------------------------- +DROP TABLE IF EXISTS "public"."chat_records"; +CREATE TABLE "public"."chat_records" ( + "id" int4 NOT NULL DEFAULT nextval('chat_records_id_seq'::regclass), + "user_id" int4 NOT NULL, + "message" text COLLATE "pg_catalog"."default" NOT NULL, + "message_type" varchar(20) COLLATE "pg_catalog"."default" NOT NULL, + "sent_at" timestamp(6) NOT NULL, + "from" varchar(20) COLLATE "pg_catalog"."default" NOT NULL, + "emotion" varchar(50) COLLATE "pg_catalog"."default" +) +; + +-- ---------------------------- +-- Records of chat_records +-- ---------------------------- +INSERT INTO "public"."chat_records" VALUES (4, 1, 'hi', 'text', '2024-12-10 14:19:04.433006', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (5, 1, 'hi', 'text', '2024-12-10 14:20:28.068751', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (9, 1, 'hi', 'text', '2024-12-10 14:21:28.814157', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (10, 1, 'Hello! How can I assist you today?', 'text', '2024-12-10 14:21:56.268483', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (11, 1, 'haha', 'text', '2024-12-10 14:24:15.369111', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (12, 1, 'It looks like you might be trying to convey a positive vibe, but I''m not sure what''s funny! Would you like to share what''s on your mind? I''m all ears!', 'text', '2024-12-10 14:24:16.710076', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (13, 1, 'ohoh', 'text', '2024-12-10 14:24:21.108955', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (14, 1, 'It seems like you''re feeling excited about something! Would you like to share what''s got you so enthusiastic?', 'text', '2024-12-10 14:24:21.688398', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (15, 1, 'i need help', 'text', '2024-12-10 14:24:30.593255', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (16, 1, 'What''s going on? Do you have a specific problem or question you''d like help with? I''m here to listen and offer guidance.', 'text', '2024-12-10 14:24:31.206735', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (17, 1, 'can you draw a cat', 'text', '2024-12-10 14:24:40.431841', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (18, 1, 'I''m not capable of physically drawing images, but I can create a simple ASCII art cat for you: + + /_/\ +( o.o ) + > ^ < +______ + +How do you like it? + +Would you like me to try creating a more complex image using ASCII art?', 'text', '2024-12-10 14:24:41.437823', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (19, 1, 'hi', 'text', '2024-12-10 15:46:32.733993', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (20, 1, 'hi', 'text', '2024-12-10 15:48:17.629622', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (21, 1, 'hi', 'text', '2024-12-10 15:50:25.403429', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (22, 1, 'It sounds like we''re starting with a playful vibe! What''s on your mind? Want to chat about something in particular or just shoot the breeze?', 'text', '2024-12-10 15:50:26.696151', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (23, 1, 'my name is kai', 'text', '2024-12-10 15:50:37.89681', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (24, 1, 'It seems like we''re getting the party started! What''s on your mind? Want to chat about something in particular or just shoot the breeze?', 'text', '2024-12-10 15:50:38.654781', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (25, 1, 'hi', 'text', '2024-12-10 15:52:21.528397', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (26, 1, 'hi', 'text', '2024-12-10 15:58:02.174658', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (27, 1, '123', 'text', '2024-12-10 15:58:31.236287', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (28, 1, 'hi', 'text', '2024-12-10 15:59:41.092132', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (32, 1, 'hi', 'text', '2024-12-10 16:04:27.895187', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (33, 1, 'It seems like you''re trying to say something, but it''s a bit hard to decipher. Would you like to type out what''s on your mind or need assistance with anything? I''m here to help!', 'text', '2024-12-10 16:04:31.943038', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (34, 1, 'hi', 'text', '2024-12-10 16:15:37.578786', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (35, 1, 'hi,', 'text', '2024-12-10 16:18:02.406613', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (36, 1, 'hi', 'text', '2024-12-10 16:19:29.660508', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (37, 1, 'You''re saying "hi" three times in a row! How''s your day going so far?', 'text', '2024-12-10 16:19:30.573053', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (38, 1, 'my name is kai', 'text', '2024-12-10 16:19:39.19225', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (39, 1, 'It looks like you''re saying "Hi" three times in a row! I''m happy to chat with you, Kai. How''s your day going so far?', 'text', '2024-12-10 16:19:39.889584', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (40, 1, '1', 'text', '2024-12-10 16:25:49.24167', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (41, 1, '1', 'text', '2024-12-10 16:26:32.998032', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (42, 1, 'ni', 'text', '2024-12-10 16:26:58.663429', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (43, 1, 'It looks like you''re trying to communicate in Morse code, Kai! + +If I decode it correctly, the message would be: + +"H-E-L-L-O" + +Am I right?', 'text', '2024-12-10 16:26:59.751114', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (44, 1, 'my name is kai', 'text', '2024-12-10 16:27:05.107474', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (45, 1, 'Nice to meet you, Kai! How''s your day going so far?', 'text', '2024-12-10 16:27:05.707862', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (46, 1, 'i am fine ', 'text', '2024-12-10 16:27:15.210821', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (47, 1, 'It''s nice to meet you, Kai. It sounds like everything is good with you right now. Is there anything on your mind that you''d like to talk about or any questions you have? I''m here to listen.', 'text', '2024-12-10 16:27:16.083285', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (48, 1, 'what is my name', 'text', '2024-12-10 16:27:24.049851', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (49, 1, 'Your name is Kai.', 'text', '2024-12-10 16:27:24.594105', 'AI', 'normal'); +INSERT INTO "public"."chat_records" VALUES (50, 1, 'yeah i i am happy you remember me', 'text', '2024-12-10 16:31:06.337574', 'User', 'normal'); +INSERT INTO "public"."chat_records" VALUES (51, 1, 'I''m glad to hear that I can recall our conversation, but I don''t actually have any information about your name or personal identity. This is the beginning of our conversation, and I''m starting from a blank slate. Would you like to share your name with me?', 'text', '2024-12-10 16:31:07.277692', 'AI', 'normal'); + +-- ---------------------------- +-- Primary Key structure for table chat_records +-- ---------------------------- +ALTER TABLE "public"."chat_records" ADD CONSTRAINT "chat_records_pkey" PRIMARY KEY ("id"); + +-- ---------------------------- +-- Foreign Keys structure for table chat_records +-- ---------------------------- +ALTER TABLE "public"."chat_records" ADD CONSTRAINT "chat_records_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "public"."users" ("id") ON DELETE CASCADE ON UPDATE NO ACTION; diff --git a/server/SQL/V4_init_image.sql b/server/SQL/V4_init_image.sql new file mode 100644 index 0000000..b7847c8 --- /dev/null +++ b/server/SQL/V4_init_image.sql @@ -0,0 +1,58 @@ +/* + Navicat Premium Dump SQL + + Source Server : ai + Source Server Type : PostgreSQL + Source Server Version : 150012 (150012) + Source Host : localhost:5432 + Source Catalog : ktor + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 150012 (150012) + File Encoding : 65001 + + Date: 07/05/2025 15:11:54 +*/ + + +-- ---------------------------- +-- Table structure for image +-- ---------------------------- +DROP TABLE IF EXISTS "public"."image"; +CREATE TABLE "public"."image" ( + "id" int4 NOT NULL DEFAULT nextval('image_id_seq'::regclass), + "object_name" varchar(255) COLLATE "pg_catalog"."default", + "upload_datetime" timestamp(6), + "file_name" varchar(255) COLLATE "pg_catalog"."default", + "resolution" varchar(255) COLLATE "pg_catalog"."default", + "size" float8, + "cocoon_count" int2, + "max_confidence" float4, + "min_confidence" float4, + "average_confidence" float4, + "other_info" json, + "processing_time" timestamp(6) +) +; +COMMENT ON COLUMN "public"."image"."object_name" IS 'oss对象名称'; +COMMENT ON COLUMN "public"."image"."upload_datetime" IS '图片上传时间'; +COMMENT ON COLUMN "public"."image"."file_name" IS '图片原始文件名'; +COMMENT ON COLUMN "public"."image"."resolution" IS '图片分辨率'; +COMMENT ON COLUMN "public"."image"."size" IS '图片大小'; +COMMENT ON COLUMN "public"."image"."cocoon_count" IS '识别到的蚕茧总数'; +COMMENT ON COLUMN "public"."image"."max_confidence" IS '最高置信度'; +COMMENT ON COLUMN "public"."image"."min_confidence" IS '最低置信度'; +COMMENT ON COLUMN "public"."image"."average_confidence" IS '平均置信度'; +COMMENT ON COLUMN "public"."image"."other_info" IS '识别到的其他信息(使用json表示)'; +COMMENT ON COLUMN "public"."image"."processing_time" IS '分析耗时'; + +-- ---------------------------- +-- Records of image +-- ---------------------------- +INSERT INTO "public"."image" VALUES (1, 'sample_image_001.jpg', '2025-03-18 14:30:00', 'image_001.jpg', '1920x1080', 2.5, 15, 0.98, 0.75, 0.85, '{"camera_location":"Warehouse A","detected_objects":"Cocoons, Leaves"}', '2025-03-18 14:31:05'); + +-- ---------------------------- +-- Primary Key structure for table image +-- ---------------------------- +ALTER TABLE "public"."image" ADD CONSTRAINT "image_pkey" PRIMARY KEY ("id"); diff --git a/server/SQL/V5_init_video.sql b/server/SQL/V5_init_video.sql new file mode 100644 index 0000000..20ebfae --- /dev/null +++ b/server/SQL/V5_init_video.sql @@ -0,0 +1,54 @@ +/* + Navicat Premium Dump SQL + + Source Server : ai + Source Server Type : PostgreSQL + Source Server Version : 150012 (150012) + Source Host : localhost:5432 + Source Catalog : ktor + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 150012 (150012) + File Encoding : 65001 + + Date: 07/05/2025 15:12:19 +*/ + + +-- ---------------------------- +-- Table structure for video +-- ---------------------------- +DROP TABLE IF EXISTS "public"."video"; +CREATE TABLE "public"."video" ( + "id" int4 NOT NULL, + "v_name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "v_object_name" varchar(255) COLLATE "pg_catalog"."default", + "v_start_datetime" timestamp(0) NOT NULL, + "v_file_name" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "v_duration" float4 NOT NULL, + "v_size" float4 NOT NULL, + "v_video_codec" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, + "v_audio_codec" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, + "v_overall_bit_rate" int4 NOT NULL, + "v_resolution" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, + "v_a_time" timestamp(0) NOT NULL, + "v_a_total_people" int4 NOT NULL, + "v_a_count_people" int4 NOT NULL, + "v_a_max_stay_time" float4 NOT NULL, + "v_a_max_action" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, + "v_a_average_masked_ratio" float4 NOT NULL +) +; + +-- ---------------------------- +-- Records of video +-- ---------------------------- +INSERT INTO "public"."video" VALUES (1, '完整喂桑视频测试', 'aff72221-f9d2-4e08-b20a-6cbcb32d8461', '2024-07-18 05:35:47', 'cult_sample_feed_full.mp4', 300, 47.75, 'AVC', 'AAC LC', 1335101, '2304x1296', '2024-10-18 10:21:03', 5, 60, 86, 'feed', 0.33); +INSERT INTO "public"."video" VALUES (0, '完整消毒视频测试', 'd9c73260-25dd-49d9-8fe1-5b796173e4e6', '2024-07-12 20:54:55', 'cult_sample_disinfection_full.mp4', 300, 36.4, 'AVC', 'AAC LC', 1017703, '2304x1296', '2024-10-18 10:19:05', 4, 49, 112.27, 'disinfection', 0.33); +INSERT INTO "public"."video" VALUES (2, '8月16日视频测试', 'a17f669d-2852-4cbe-9196-be1cf6289034', '2024-08-16 23:03:19', '51454b0d95ec9599a3df1fe98d20bd28.mp4', 464, 33.09, 'AVC', 'AAC LC', 598182, '960x544', '2024-10-22 13:43:26', 4, 102, 202.07, 'feed', 0.52); + +-- ---------------------------- +-- Primary Key structure for table video +-- ---------------------------- +ALTER TABLE "public"."video" ADD CONSTRAINT "video_pkey" PRIMARY KEY ("id"); diff --git a/server/SQL/V6_init_video_analytics_detail.sql b/server/SQL/V6_init_video_analytics_detail.sql new file mode 100644 index 0000000..34cb422 --- /dev/null +++ b/server/SQL/V6_init_video_analytics_detail.sql @@ -0,0 +1,127 @@ +/* + Navicat Premium Dump SQL + + Source Server : ai + Source Server Type : PostgreSQL + Source Server Version : 150012 (150012) + Source Host : localhost:5432 + Source Catalog : ktor + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 150012 (150012) + File Encoding : 65001 + + Date: 07/05/2025 15:12:36 +*/ + + +-- ---------------------------- +-- Table structure for video_analytics_detail +-- ---------------------------- +DROP TABLE IF EXISTS "public"."video_analytics_detail"; +CREATE TABLE "public"."video_analytics_detail" ( + "id" int4 NOT NULL, + "v_id" int4, + "a_time_stamp" int4 NOT NULL, + "a_total_people" int4, + "a_total_people_masked" int4, + "a_action" varchar(50) COLLATE "pg_catalog"."default" +) +; + +-- ---------------------------- +-- Records of video_analytics_detail +-- ---------------------------- +INSERT INTO "public"."video_analytics_detail" VALUES (1378, 0, 1, 0, 0, '--'); +INSERT INTO "public"."video_analytics_detail" VALUES (1379, 0, 11, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1380, 0, 23, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1381, 0, 33, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1382, 0, 49, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1383, 0, 59, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1384, 0, 69, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1385, 0, 79, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1386, 0, 89, 3, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1387, 0, 101, 4, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1388, 0, 111, 3, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1389, 0, 123, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1390, 0, 133, 3, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1391, 0, 143, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1392, 0, 153, 3, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1393, 0, 163, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1394, 0, 173, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1395, 0, 183, 3, 1, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1396, 0, 193, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1397, 0, 203, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1398, 0, 213, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1399, 0, 223, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1400, 0, 233, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1401, 0, 243, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1402, 0, 253, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1403, 0, 276, 0, 0, '--'); +INSERT INTO "public"."video_analytics_detail" VALUES (1404, 0, 287, 1, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1405, 0, 297, 2, 0, 'disinfection'); +INSERT INTO "public"."video_analytics_detail" VALUES (1406, 1, 1, 0, 0, '--'); +INSERT INTO "public"."video_analytics_detail" VALUES (1407, 1, 12, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1408, 1, 22, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1409, 1, 34, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1410, 1, 44, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1411, 1, 54, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1412, 1, 65, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1413, 1, 75, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1414, 1, 85, 4, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1415, 1, 95, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1416, 1, 106, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1417, 1, 116, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1418, 1, 126, 4, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1419, 1, 136, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1420, 1, 146, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1421, 1, 156, 3, 1, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1422, 1, 166, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1423, 1, 177, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1424, 1, 187, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1425, 1, 197, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1426, 1, 207, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1427, 1, 217, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1428, 1, 228, 4, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1429, 1, 238, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1430, 1, 248, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1431, 1, 259, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1432, 1, 269, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1433, 1, 279, 5, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1434, 1, 289, 4, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1435, 2, 1, 0, 0, '--'); +INSERT INTO "public"."video_analytics_detail" VALUES (1436, 2, 46, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1437, 2, 56, 0, 0, '--'); +INSERT INTO "public"."video_analytics_detail" VALUES (1438, 2, 129, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1439, 2, 139, 2, 2, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1440, 2, 149, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1441, 2, 159, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1442, 2, 169, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1443, 2, 179, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1444, 2, 189, 4, 2, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1445, 2, 199, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1446, 2, 209, 3, 1, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1447, 2, 219, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1448, 2, 229, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1449, 2, 239, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1450, 2, 252, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1451, 2, 267, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1452, 2, 277, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1453, 2, 290, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1454, 2, 300, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1455, 2, 310, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1456, 2, 320, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1457, 2, 330, 4, 1, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1458, 2, 340, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1459, 2, 350, 4, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1460, 2, 360, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1461, 2, 371, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1462, 2, 381, 3, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1463, 2, 393, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1464, 2, 403, 4, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1465, 2, 413, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1466, 2, 423, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1467, 2, 433, 2, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1468, 2, 443, 1, 0, 'feed'); +INSERT INTO "public"."video_analytics_detail" VALUES (1469, 2, 454, 0, 0, '--'); diff --git a/server/SQL/V7_init_users.sql b/server/SQL/V7_init_users.sql new file mode 100644 index 0000000..3bb5028 --- /dev/null +++ b/server/SQL/V7_init_users.sql @@ -0,0 +1,44 @@ +/* + Navicat Premium Dump SQL + + Source Server : ai + Source Server Type : PostgreSQL + Source Server Version : 150012 (150012) + Source Host : localhost:5432 + Source Catalog : ktor + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 150012 (150012) + File Encoding : 65001 + + Date: 07/05/2025 15:11:15 +*/ + + +-- ---------------------------- +-- Table structure for users +-- ---------------------------- +DROP TABLE IF EXISTS "public"."users"; +CREATE TABLE "public"."users" ( + "id" int4 NOT NULL DEFAULT nextval('users_id_seq'::regclass), + "username" varchar(50) COLLATE "pg_catalog"."default", + "email" varchar(32) COLLATE "pg_catalog"."default", + "phone" varchar(32) COLLATE "pg_catalog"."default", + "password_hash" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "is_active" bool NOT NULL DEFAULT true, + "created_at" timestamp(6), + "updated_at" timestamp(6) +) +; + +-- ---------------------------- +-- Records of users +-- ---------------------------- +INSERT INTO "public"."users" VALUES (1, '最高管理员', 'bbit', NULL, 'c021ae1eb58aeacdb876fa0f4c5cfd7fc9903bfc876b1350c2ecc4df46932dfd', 't', '2024-12-09 21:53:25.339559', '2024-12-09 21:53:25.341189'); +INSERT INTO "public"."users" VALUES (2, '测试用户', '1', NULL, '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b', 't', NULL, NULL); + +-- ---------------------------- +-- Primary Key structure for table users +-- ---------------------------- +ALTER TABLE "public"."users" ADD CONSTRAINT "users_pkey" PRIMARY KEY ("id");