data(postgresql).sql 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. -- Table: public.data
  2. DROP TABLE IF EXISTS public.data;
  3. CREATE TABLE IF NOT EXISTS public.data
  4. (
  5. id bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
  6. name character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  7. data_type character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  8. file_type character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  9. object_type character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  10. object_subtype character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  11. batch_num bigint,
  12. scene character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  13. data_source character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  14. gather_time timestamp without time zone,
  15. gather_spot character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  16. url character varying(225) COLLATE pg_catalog."default",
  17. increment character varying(225) COLLATE pg_catalog."default" DEFAULT ''::character varying,
  18. labeled boolean DEFAULT false,
  19. CONSTRAINT data_pkey PRIMARY KEY (id)
  20. )
  21. TABLESPACE pg_default;
  22. COMMENT ON TABLE public.data
  23. IS '数据管理表';
  24. COMMENT ON COLUMN public.data.id
  25. IS 'id';
  26. COMMENT ON COLUMN public.data.name
  27. IS '名称';
  28. COMMENT ON COLUMN public.data.data_type
  29. IS '数据类型';
  30. COMMENT ON COLUMN public.data.file_type
  31. IS '文件类型';
  32. COMMENT ON COLUMN public.data.object_type
  33. IS '目标类型';
  34. COMMENT ON COLUMN public.data.object_subtype
  35. IS '目标子类型';
  36. COMMENT ON COLUMN public.data.batch_num
  37. IS '批次号';
  38. COMMENT ON COLUMN public.data.scene
  39. IS '场景';
  40. COMMENT ON COLUMN public.data.data_source
  41. IS '数据源';
  42. COMMENT ON COLUMN public.data.gather_time
  43. IS '采集时间';
  44. COMMENT ON COLUMN public.data.gather_spot
  45. IS '采集地点';
  46. COMMENT ON COLUMN public.data.url
  47. IS '图片url';
  48. COMMENT ON COLUMN public.data.increment
  49. IS '扩增方式';
  50. COMMENT ON COLUMN public.data.labeled
  51. IS '是否标注';
  52. -- 菜单 SQL
  53. INSERT INTO public.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, component_name, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, version, create_by, create_time, update_by, update_time, remark) VALUES (2002, '数据管理查询', 2001, 1, NULL, '', NULL, NULL, '1', '0', 'F', '0', '0', 'demo:data:query', NULL, 0, 1, '2024-04-22 17:21:27.187713', 1, NULL, '');
  54. INSERT INTO public.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, component_name, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, version, create_by, create_time, update_by, update_time, remark) VALUES (2003, '数据管理新增', 2001, 2, NULL, '', NULL, NULL, '1', '0', 'F', '0', '0', 'demo:data:add', NULL, 0, 1, '2024-04-22 17:21:27.187713', 1, NULL, '');
  55. INSERT INTO public.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, component_name, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, version, create_by, create_time, update_by, update_time, remark) VALUES (2004, '数据管理修改', 2001, 3, NULL, '', NULL, NULL, '1', '0', 'F', '0', '0', 'demo:data:edit', NULL, 0, 1, '2024-04-22 17:21:27.187713', 1, NULL, '');
  56. INSERT INTO public.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, component_name, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, version, create_by, create_time, update_by, update_time, remark) VALUES (2005, '数据管理删除', 2001, 4, NULL, '', NULL, NULL, '1', '0', 'F', '0', '0', 'demo:data:remove', NULL, 0, 1, '2024-04-22 17:21:27.187713', 1, NULL, '');
  57. INSERT INTO public.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, component_name, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, version, create_by, create_time, update_by, update_time, remark) VALUES (2006, '数据管理导出', 2001, 5, NULL, '', NULL, NULL, '1', '0', 'F', '0', '0', 'demo:data:export', NULL, 0, 1, '2024-04-22 17:21:27.187713', 1, NULL, '');
  58. INSERT INTO public.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, component_name, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, version, create_by, create_time, update_by, update_time, remark) VALUES (2001, '数据管理', 2, 1, '/demo/data', 'demo/data/index', '数据管理', NULL, '1', '0', 'C', '0', '0', 'demo:data:list', NULL, 6, 1, '2024-04-22 17:21:27.187713', 1, '2024-04-23 20:38:36.673', '数据管理菜单');
  59. INSERT INTO public.sys_menu (menu_id, menu_name, parent_id, order_num, path, component, component_name, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon, version, create_by, create_time, update_by, update_time, remark) VALUES (2, '数据管理', 0, 2, 'data', NULL, NULL, NULL, '1', '0', 'M', '0', '0', NULL, 'data', 0, 1, NULL, 1, NULL, '数据管理目录');
  60. -- 算法配置表
  61. CREATE TABLE "public"."algorithm_config" (
  62. "id" "pg_catalog"."int8" NOT NULL,
  63. "subsystem" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
  64. "algorithm_name" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
  65. "algorithm_address" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
  66. "parameter_config" "pg_catalog"."text" COLLATE "pg_catalog"."default",
  67. "created_by" "pg_catalog"."int8",
  68. "created_at" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
  69. "updated_by" "pg_catalog"."int8",
  70. "updated_at" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
  71. "remarks" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
  72. "tenant_id" "pg_catalog"."int8" DEFAULT 0,
  73. CONSTRAINT "algorithm_config_pkey" PRIMARY KEY ("id")
  74. )
  75. ;
  76. ALTER TABLE "public"."algorithm_config"
  77. OWNER TO "postgres";
  78. COMMENT ON COLUMN "public"."algorithm_config"."id" IS '主键ID';
  79. COMMENT ON COLUMN "public"."algorithm_config"."subsystem" IS '分系统';
  80. COMMENT ON COLUMN "public"."algorithm_config"."algorithm_name" IS '算法名称';
  81. COMMENT ON COLUMN "public"."algorithm_config"."algorithm_address" IS '算法地址';
  82. COMMENT ON COLUMN "public"."algorithm_config"."parameter_config" IS '参数配置';
  83. COMMENT ON COLUMN "public"."algorithm_config"."created_by" IS '创建人';
  84. COMMENT ON COLUMN "public"."algorithm_config"."created_at" IS '创建时间';
  85. COMMENT ON COLUMN "public"."algorithm_config"."updated_by" IS '更新人';
  86. COMMENT ON COLUMN "public"."algorithm_config"."updated_at" IS '更新时间';
  87. COMMENT ON COLUMN "public"."algorithm_config"."remarks" IS '备注';
  88. COMMENT ON TABLE "public"."algorithm_config" IS '算法配置表';
  89. -- 菜单 SQL
  90. insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
  91. values(2024052715012200, '算法配置', 152584418900430848, '1', 'agMange', 'biz/agMange/index', 1, 0, 'C', '0', '0', 'biz:agMange:list', '', 1, now(), 1, null, '算法配置菜单');
  92. -- 按钮 SQL
  93. insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
  94. values(2024052715012201, '算法配置查询', 2024052715012200, '1', '', '', 1, 0, 'F', '0', '0', 'biz:agMange:query', '', 1, now(), 1, null, '');
  95. insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
  96. values(2024052715012202, '算法配置新增', 2024052715012200, '2', '', '', 1, 0, 'F', '0', '0', 'biz:agMange:add', '', 1, now(), 1, null, '');
  97. insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
  98. values(2024052715012203, '算法配置修改', 2024052715012200, '3', '', '', 1, 0, 'F', '0', '0', 'biz:agMange:edit', '', 1, now(), 1, null, '');
  99. insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
  100. values(2024052715012204, '算法配置删除', 2024052715012200, '4', '', '', 1, 0, 'F', '0', '0', 'biz:agMange:remove', '', 1, now(), 1, null, '');
  101. insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
  102. values(2024052715012205, '算法配置导出', 2024052715012200, '5', '', '', 1, 0, 'F', '0', '0', 'biz:agMange:export', '', 1, now(), 1, null, '');