20260924_中期预报表.sql 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. CREATE SEQUENCE IF NOT EXISTS "public"."data_medium_term_power_forecast_raw__id_seq";
  2. DROP TABLE IF EXISTS "public"."data_medium_term_power_forecast_raw";
  3. CREATE TABLE "public"."data_medium_term_power_forecast_raw" (
  4. "_id" integer NOT NULL DEFAULT nextval(
  5. 'data_medium_term_power_forecast_raw__id_seq'::regclass
  6. ),
  7. "latitude" character varying(255),
  8. "longitude" character varying(255),
  9. "data_org_type" character varying(255) NOT NULL,
  10. "data_type" integer NOT NULL,
  11. "business_process_type" integer NOT NULL,
  12. "data_source" integer NOT NULL,
  13. "data_sourcegrab_id" integer NOT NULL,
  14. "data_sourcegrab_pattern_name" character varying(255) NOT NULL,
  15. "data_model_id" integer NOT NULL,
  16. "data_model_name" character varying(255) NOT NULL,
  17. "source_id" integer NOT NULL,
  18. "source_name" character varying(255) NOT NULL,
  19. "entity_id" character varying(255) NOT NULL,
  20. "entity_type" character varying(255) NOT NULL,
  21. "create_time" integer NOT NULL,
  22. "start_time" integer NOT NULL,
  23. "forecast_time" integer NOT NULL,
  24. "pre_days" integer NOT NULL,
  25. "lead_time" integer NOT NULL,
  26. "station_id" bigint,
  27. "station_name" character varying(255),
  28. "subject_id" integer,
  29. "subject_name" character varying(255),
  30. "machine_id" character varying(255),
  31. "machine_name" character varying(255),
  32. "analyze_his_id" integer,
  33. "archive_record_id" integer,
  34. "power" character varying(255)
  35. );
  36. COMMENT ON TABLE "public"."data_medium_term_power_forecast_raw" IS '中期功率原始数据表';
  37. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."_id" IS '唯一标识';
  38. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."latitude" IS '经度';
  39. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."longitude" IS '纬度';
  40. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."data_org_type" IS '数据种类:单点时间序列';
  41. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."data_type" IS '数据类型:短期气象';
  42. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."business_process_type" IS '数据业务类型:原始';
  43. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."data_source" IS '数据来源';
  44. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."data_sourcegrab_id" IS '数据源抓取ID';
  45. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."data_sourcegrab_pattern_name" IS '数据抓取模式名称';
  46. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."data_model_id" IS '数据模型ID';
  47. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."data_model_name" IS '数据模型名称';
  48. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."source_id" IS '数据源ID';
  49. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."source_name" IS '数据源名称';
  50. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."entity_id" IS '实体ID';
  51. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."entity_type" IS '实体类型';
  52. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."create_time" IS '创建时间';
  53. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."start_time" IS '起报时间';
  54. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."forecast_time" IS '预测时间';
  55. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."pre_days" IS '预报天数';
  56. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."lead_time" IS '预报时效';
  57. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."station_id" IS '场站ID';
  58. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."station_name" IS '场站名称';
  59. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."subject_id" IS '交易主题ID';
  60. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."subject_name" IS '交易主题名称';
  61. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."machine_id" IS '风机ID';
  62. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."machine_name" IS '风机名称';
  63. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."analyze_his_id" IS '文件解析ID:文件解析时存在';
  64. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."archive_record_id" IS '文件归档ID:文件解析时存在';
  65. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_raw"."power" IS '预测功率';
  66. CREATE SEQUENCE IF NOT EXISTS "public"."data_medium_term_power_forecast_issued__id_seq";
  67. DROP TABLE IF EXISTS "public"."data_medium_term_power_forecast_issued";
  68. CREATE TABLE "public"."data_medium_term_power_forecast_issued" (
  69. "_id" integer NOT NULL DEFAULT nextval(
  70. 'data_medium_term_power_forecast_issued__id_seq'::regclass
  71. ),
  72. "data_sourcegrab_id" integer NOT NULL,
  73. "data_sourcegrab_pattern_name" character varying(255) NOT NULL,
  74. "entity_id" character varying(255) NOT NULL,
  75. "entity_type" integer NOT NULL,
  76. "entity_name" character varying(255),
  77. "create_time" integer NOT NULL,
  78. "start_time" integer NOT NULL,
  79. "forecast_time" integer NOT NULL,
  80. "predays" integer NOT NULL,
  81. "power" character varying(255)
  82. );
  83. COMMENT ON TABLE "public"."data_medium_term_power_forecast_issued" IS '中期功率下发数据表';
  84. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."_id" IS '唯一标识';
  85. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."data_sourcegrab_id" IS '数据源抓取ID';
  86. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."data_sourcegrab_pattern_name" IS '数据抓取模式名称';
  87. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."entity_id" IS '实体ID';
  88. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."entity_type" IS '实体类型';
  89. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."entity_name" IS '实体名称';
  90. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."create_time" IS '创建时间';
  91. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."start_time" IS '起报时间';
  92. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."forecast_time" IS '预测时间';
  93. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."predays" IS '预报天数';
  94. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_issued"."power" IS '预测功率';
  95. CREATE SEQUENCE IF NOT EXISTS "public"."data_medium_term_power_forecast_correct__id_seq";
  96. DROP TABLE IF EXISTS "public"."data_medium_term_power_forecast_correct";
  97. CREATE TABLE "public"."data_medium_term_power_forecast_correct" (
  98. "_id" integer NOT NULL DEFAULT nextval(
  99. 'data_medium_term_power_forecast_correct__id_seq'::regclass
  100. ),
  101. "data_sourcegrab_id" integer NOT NULL,
  102. "data_sourcegrab_pattern_name" character varying(255) NOT NULL,
  103. "entity_id" character varying(255) NOT NULL,
  104. "entity_type" integer NOT NULL,
  105. "entity_name" character varying(255),
  106. "create_time" integer NOT NULL,
  107. "start_time" integer NOT NULL,
  108. "forecast_time" integer NOT NULL,
  109. "predays" integer NOT NULL,
  110. "power" character varying(255)
  111. );
  112. COMMENT ON TABLE "public"."data_medium_term_power_forecast_correct" IS '中期功率修正数据表';
  113. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."_id" IS '唯一标识';
  114. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."data_sourcegrab_id" IS '数据源抓取ID';
  115. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."data_sourcegrab_pattern_name" IS '数据抓取模式名称';
  116. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."entity_id" IS '实体ID';
  117. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."entity_type" IS '实体类型';
  118. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."entity_name" IS '实体名称';
  119. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."create_time" IS '创建时间';
  120. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."start_time" IS '起报时间';
  121. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."forecast_time" IS '预测时间';
  122. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."predays" IS '预报天数';
  123. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_correct"."power" IS '预测功率';
  124. CREATE SEQUENCE IF NOT EXISTS "public"."data_medium_term_power_forecast_report__id_seq";
  125. DROP TABLE IF EXISTS "public"."data_medium_term_power_forecast_report";
  126. CREATE TABLE "public"."data_medium_term_power_forecast_report" (
  127. "_id" integer NOT NULL DEFAULT nextval(
  128. 'data_medium_term_power_forecast_report__id_seq'::regclass
  129. ),
  130. "data_sourcegrab_id" integer NOT NULL,
  131. "data_sourcegrab_pattern_name" character varying(255) NOT NULL,
  132. "entity_id" character varying(255) NOT NULL,
  133. "entity_type" integer NOT NULL,
  134. "entity_name" character varying(255),
  135. "create_time" integer NOT NULL,
  136. "start_time" integer NOT NULL,
  137. "forecast_time" integer NOT NULL,
  138. "predays" integer NOT NULL,
  139. "power" character varying(255)
  140. );
  141. COMMENT ON TABLE "public"."data_medium_term_power_forecast_report" IS '中期功率上报数据表';
  142. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."_id" IS '唯一标识';
  143. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."data_sourcegrab_id" IS '数据源抓取ID';
  144. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."data_sourcegrab_pattern_name" IS '数据抓取模式名称';
  145. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."entity_id" IS '实体ID';
  146. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."entity_type" IS '实体类型';
  147. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."entity_name" IS '实体名称';
  148. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."create_time" IS '创建时间';
  149. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."start_time" IS '起报时间';
  150. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."forecast_time" IS '预测时间';
  151. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."predays" IS '预报天数';
  152. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_report"."power" IS '预测功率';
  153. CREATE SEQUENCE IF NOT EXISTS "public"."data_medium_term_power_forecast_back__id_seq";
  154. DROP TABLE IF EXISTS "public"."data_medium_term_power_forecast_back";
  155. CREATE TABLE "public"."data_medium_term_power_forecast_back" (
  156. "_id" integer NOT NULL DEFAULT nextval(
  157. 'data_medium_term_power_forecast_back__id_seq'::regclass
  158. ),
  159. "data_sourcegrab_id" integer NOT NULL,
  160. "data_sourcegrab_pattern_name" character varying(255) NOT NULL,
  161. "entity_id" character varying(255) NOT NULL,
  162. "entity_type" integer NOT NULL,
  163. "entity_name" character varying(255),
  164. "create_time" integer NOT NULL,
  165. "start_time" integer NOT NULL,
  166. "forecast_time" integer NOT NULL,
  167. "predays" integer NOT NULL,
  168. "power" character varying(255)
  169. );
  170. COMMENT ON TABLE "public"."data_medium_term_power_forecast_back" IS '中期功率回传数据表';
  171. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."_id" IS '唯一标识';
  172. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."data_sourcegrab_id" IS '数据源抓取ID';
  173. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."data_sourcegrab_pattern_name" IS '数据抓取模式名称';
  174. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."entity_id" IS '实体ID';
  175. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."entity_type" IS '实体类型';
  176. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."entity_name" IS '实体名称';
  177. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."create_time" IS '创建时间';
  178. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."start_time" IS '起报时间';
  179. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."forecast_time" IS '预测时间';
  180. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."predays" IS '预报天数';
  181. COMMENT ON COLUMN "public"."data_medium_term_power_forecast_back"."power" IS '预测功率';