diff --git a/generated/prisma/browser.ts b/generated/prisma/browser.ts index d5b6da2..dfa08fc 100644 --- a/generated/prisma/browser.ts +++ b/generated/prisma/browser.ts @@ -37,6 +37,11 @@ export type Strategy = Prisma.StrategyModel * */ export type Indicator = Prisma.IndicatorModel +/** + * Model IndicatorPoint + * + */ +export type IndicatorPoint = Prisma.IndicatorPointModel /** * Model Econ_SowInventory * diff --git a/generated/prisma/client.ts b/generated/prisma/client.ts index bb7054a..2c80d98 100644 --- a/generated/prisma/client.ts +++ b/generated/prisma/client.ts @@ -61,6 +61,11 @@ export type Strategy = Prisma.StrategyModel * */ export type Indicator = Prisma.IndicatorModel +/** + * Model IndicatorPoint + * + */ +export type IndicatorPoint = Prisma.IndicatorPointModel /** * Model Econ_SowInventory * diff --git a/generated/prisma/commonInputTypes.ts b/generated/prisma/commonInputTypes.ts index 6238128..ad63da1 100644 --- a/generated/prisma/commonInputTypes.ts +++ b/generated/prisma/commonInputTypes.ts @@ -150,6 +150,46 @@ export type JsonWithAggregatesFilterBase<$PrismaModel = never> = { _max?: Prisma.NestedJsonFilter<$PrismaModel> } +export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type FloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + +export type FloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedFloatFilter<$PrismaModel> + _min?: Prisma.NestedFloatFilter<$PrismaModel> + _max?: Prisma.NestedFloatFilter<$PrismaModel> +} + export type StringNullableFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null in?: string[] | null @@ -359,6 +399,35 @@ export type NestedJsonFilterBase<$PrismaModel = never> = { not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter } +export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedFloatFilter<$PrismaModel> + _min?: Prisma.NestedFloatFilter<$PrismaModel> + _max?: Prisma.NestedFloatFilter<$PrismaModel> +} + export type NestedStringNullableFilter<$PrismaModel = never> = { equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null in?: string[] | null diff --git a/generated/prisma/internal/class.ts b/generated/prisma/internal/class.ts index b098285..c79518b 100644 --- a/generated/prisma/internal/class.ts +++ b/generated/prisma/internal/class.ts @@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.7.0", "engineVersion": "75cbdc1eb7150937890ad5465d861175c6624711", "activeProvider": "mysql", - "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Get a free hosted Postgres database in seconds: `npx create-db`\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel User {\n id Int @id @default(autoincrement())\n name String\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Article {\n id Int @id @default(autoincrement())\n title String\n slug String @unique\n content String\n date String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Strategy {\n id Int @id @default(autoincrement())\n name String\n description String\n data Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Indicator {\n id Int @id @default(autoincrement())\n name String\n groupName String\n data Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Econ_SowInventory {\n id Int @id @default(autoincrement())\n month String @unique\n inventory Int // 能繁母猪数量(万头)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel ScraperCache {\n id Int @id @default(autoincrement())\n scraperName String @unique // 爬虫名称,如:sow-inventory\n lastDataHash String? // 上次数据指纹\n lastUpdateAt DateTime // 上次更新时间\n metadata Json? // 其他元数据\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n", + "inlineSchema": "// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\n// Get a free hosted Postgres database in seconds: `npx create-db`\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel User {\n id Int @id @default(autoincrement())\n name String\n email String @unique\n password String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Article {\n id Int @id @default(autoincrement())\n title String\n slug String @unique\n content String\n date String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Strategy {\n id Int @id @default(autoincrement())\n name String\n description String\n data Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Indicator {\n id Int @id @default(autoincrement())\n name String @unique\n groupName String\n title String @default(\"\")\n unit String @default(\"\")\n source String @default(\"\")\n frequency String @default(\"month\") // year | quarter | month | day\n hidden Boolean @default(false) // true = 数据/脚本保留, 但不在前端展示\n points IndicatorPoint[]\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel IndicatorPoint {\n id Int @id @default(autoincrement())\n indicatorId Int\n indicator Indicator @relation(fields: [indicatorId], references: [id], onDelete: Cascade)\n period String // \"2024\" | \"2024-Q1\" | \"2024-01\" | \"2024-01-15\"\n value Float\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([indicatorId, period])\n}\n\nmodel Econ_SowInventory {\n id Int @id @default(autoincrement())\n month String @unique\n inventory Int // 能繁母猪数量(万头)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel ScraperCache {\n id Int @id @default(autoincrement())\n scraperName String @unique // 爬虫名称,如:sow-inventory\n lastDataHash String? // 上次数据指纹\n lastUpdateAt DateTime // 上次更新时间\n metadata Json? // 其他元数据\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -32,10 +32,10 @@ const config: runtime.GetPrismaClientConfig = { } } -config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Article\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"slug\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Strategy\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Indicator\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"groupName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Econ_SowInventory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"month\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inventory\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ScraperCache\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"scraperName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastDataHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastUpdateAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Article\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"slug\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"date\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Strategy\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Indicator\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"groupName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"source\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"frequency\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"hidden\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"points\",\"kind\":\"object\",\"type\":\"IndicatorPoint\",\"relationName\":\"IndicatorToIndicatorPoint\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"IndicatorPoint\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"indicatorId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"indicator\",\"kind\":\"object\",\"type\":\"Indicator\",\"relationName\":\"IndicatorToIndicatorPoint\"},{\"name\":\"period\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"Float\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"Econ_SowInventory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"month\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inventory\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"ScraperCache\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"scraperName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastDataHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastUpdateAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"metadata\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") config.parameterizationSchema = { - strings: JSON.parse("[\"where\",\"User.findUnique\",\"User.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"User.findFirst\",\"User.findFirstOrThrow\",\"User.findMany\",\"data\",\"User.createOne\",\"User.createMany\",\"User.updateOne\",\"User.updateMany\",\"create\",\"update\",\"User.upsertOne\",\"User.deleteOne\",\"User.deleteMany\",\"having\",\"_count\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"User.groupBy\",\"User.aggregate\",\"Article.findUnique\",\"Article.findUniqueOrThrow\",\"Article.findFirst\",\"Article.findFirstOrThrow\",\"Article.findMany\",\"Article.createOne\",\"Article.createMany\",\"Article.updateOne\",\"Article.updateMany\",\"Article.upsertOne\",\"Article.deleteOne\",\"Article.deleteMany\",\"Article.groupBy\",\"Article.aggregate\",\"Strategy.findUnique\",\"Strategy.findUniqueOrThrow\",\"Strategy.findFirst\",\"Strategy.findFirstOrThrow\",\"Strategy.findMany\",\"Strategy.createOne\",\"Strategy.createMany\",\"Strategy.updateOne\",\"Strategy.updateMany\",\"Strategy.upsertOne\",\"Strategy.deleteOne\",\"Strategy.deleteMany\",\"Strategy.groupBy\",\"Strategy.aggregate\",\"Indicator.findUnique\",\"Indicator.findUniqueOrThrow\",\"Indicator.findFirst\",\"Indicator.findFirstOrThrow\",\"Indicator.findMany\",\"Indicator.createOne\",\"Indicator.createMany\",\"Indicator.updateOne\",\"Indicator.updateMany\",\"Indicator.upsertOne\",\"Indicator.deleteOne\",\"Indicator.deleteMany\",\"Indicator.groupBy\",\"Indicator.aggregate\",\"Econ_SowInventory.findUnique\",\"Econ_SowInventory.findUniqueOrThrow\",\"Econ_SowInventory.findFirst\",\"Econ_SowInventory.findFirstOrThrow\",\"Econ_SowInventory.findMany\",\"Econ_SowInventory.createOne\",\"Econ_SowInventory.createMany\",\"Econ_SowInventory.updateOne\",\"Econ_SowInventory.updateMany\",\"Econ_SowInventory.upsertOne\",\"Econ_SowInventory.deleteOne\",\"Econ_SowInventory.deleteMany\",\"Econ_SowInventory.groupBy\",\"Econ_SowInventory.aggregate\",\"ScraperCache.findUnique\",\"ScraperCache.findUniqueOrThrow\",\"ScraperCache.findFirst\",\"ScraperCache.findFirstOrThrow\",\"ScraperCache.findMany\",\"ScraperCache.createOne\",\"ScraperCache.createMany\",\"ScraperCache.updateOne\",\"ScraperCache.updateMany\",\"ScraperCache.upsertOne\",\"ScraperCache.deleteOne\",\"ScraperCache.deleteMany\",\"ScraperCache.groupBy\",\"ScraperCache.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"scraperName\",\"lastDataHash\",\"lastUpdateAt\",\"metadata\",\"createdAt\",\"updatedAt\",\"equals\",\"string_contains\",\"string_starts_with\",\"string_ends_with\",\"array_starts_with\",\"array_ends_with\",\"array_contains\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"in\",\"notIn\",\"contains\",\"startsWith\",\"endsWith\",\"search\",\"month\",\"inventory\",\"name\",\"groupName\",\"description\",\"title\",\"slug\",\"content\",\"date\",\"email\",\"password\",\"_relevance\",\"set\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), - graph: "1wExVAlgAACuAQAwYQAABAAQYgAArgEAMGMCAAAAAWhAAKABACFpQACgAQAhfgEAngEAIYUBAQAAAAGGAQEAngEAIQEAAAABACABAAAAAQAgCWAAAK4BADBhAAAEABBiAACuAQAwYwIAnQEAIWhAAKABACFpQACgAQAhfgEAngEAIYUBAQCeAQAhhgEBAJ4BACEBhwEAANcBACADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAMAAAAEACADAAAFADAEAAABACAGYwIAAAABaEAAAAABaUAAAAABfgEAAAABhQEBAAAAAYYBAQAAAAEBCAAACQAgBmMCAAAAAWhAAAAAAWlAAAAAAX4BAAAAAYUBAQAAAAGGAQEAAAABAQgAAAsAMAZjAgC4AQAhaEAAtwEAIWlAALcBACF-AQC1AQAhhQEBALUBACGGAQEAtQEAIQIAAAABACAIAAANACAGYwIAuAEAIWhAALcBACFpQAC3AQAhfgEAtQEAIYUBAQC1AQAhhgEBALUBACECAAAABAAgCAAADwAgAwAAAAEAIA0AAAkAIA4AAA0AIAEAAAABACABAAAABAAgBRMAANIBACAUAADTAQAgFQAA1gEAIBYAANUBACAXAADUAQAgCWAAAK0BADBhAAAVABBiAACtAQ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AUTAAQUAAUVAAYWAAcXAAgABRMADBQADRUADhYADxcAEAAAAAAABRMADBQADRUADhYADxcAEAAFEwAUFAAVFQAWFgAXFwAYAAAAAAAFEwAUFAAVFQAWFgAXFwAYAAUTABwUAB0VAB4WAB8XACAAAAAAAAUTABwUAB0VAB4WAB8XACAABRMAJBQAJRUAJhYAJxcAKAAAAAAABRMAJBQAJRUAJhYAJxcAKAAFEwAsFAAtFQAuFgAvFwAwAAAAAAAFEwAsFAAtFQAuFgAvFwAwAQIBAgMBBQYBBgcBBwgBCQoBCgwCCw4BDBACDxEBEBIBERMCGBYDGRcJGhkKGxoKHB0KHR4KHh8KHyEKICMCISUKIicCIygKJCkKJSoCJi0LJy4RKDASKTESKjQSKzUSLDYSLTgSLjoCLzwSMD4CMT8SMkASM0ECNEQTNUUZNkcaN0gaOEsaOUwaOk0aO08aPFECPVMaPlUCP1YaQFcaQVgCQlsbQ1whRF4iRV8iRmIiR2MiSGQiSWYiSmgCS2oiTGwCTW0iTm4iT28CUHIjUXMpUnUqU3YqVHkqVXoqVnsqV30qWH8CWYEBKlqDAQJbhAEqXIUBKl2GAQJeiQErX4oBMQ" + strings: JSON.parse("[\"where\",\"User.findUnique\",\"User.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"User.findFirst\",\"User.findFirstOrThrow\",\"User.findMany\",\"data\",\"User.createOne\",\"User.createMany\",\"User.updateOne\",\"User.updateMany\",\"create\",\"update\",\"User.upsertOne\",\"User.deleteOne\",\"User.deleteMany\",\"having\",\"_count\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"User.groupBy\",\"User.aggregate\",\"Article.findUnique\",\"Article.findUniqueOrThrow\",\"Article.findFirst\",\"Article.findFirstOrThrow\",\"Article.findMany\",\"Article.createOne\",\"Article.createMany\",\"Article.updateOne\",\"Article.updateMany\",\"Article.upsertOne\",\"Article.deleteOne\",\"Article.deleteMany\",\"Article.groupBy\",\"Article.aggregate\",\"Strategy.findUnique\",\"Strategy.findUniqueOrThrow\",\"Strategy.findFirst\",\"Strategy.findFirstOrThrow\",\"Strategy.findMany\",\"Strategy.createOne\",\"Strategy.createMany\",\"Strategy.updateOne\",\"Strategy.updateMany\",\"Strategy.upsertOne\",\"Strategy.deleteOne\",\"Strategy.deleteMany\",\"Strategy.groupBy\",\"Strategy.aggregate\",\"indicator\",\"points\",\"Indicator.findUnique\",\"Indicator.findUniqueOrThrow\",\"Indicator.findFirst\",\"Indicator.findFirstOrThrow\",\"Indicator.findMany\",\"Indicator.createOne\",\"Indicator.createMany\",\"Indicator.updateOne\",\"Indicator.updateMany\",\"Indicator.upsertOne\",\"Indicator.deleteOne\",\"Indicator.deleteMany\",\"Indicator.groupBy\",\"Indicator.aggregate\",\"IndicatorPoint.findUnique\",\"IndicatorPoint.findUniqueOrThrow\",\"IndicatorPoint.findFirst\",\"IndicatorPoint.findFirstOrThrow\",\"IndicatorPoint.findMany\",\"IndicatorPoint.createOne\",\"IndicatorPoint.createMany\",\"IndicatorPoint.updateOne\",\"IndicatorPoint.updateMany\",\"IndicatorPoint.upsertOne\",\"IndicatorPoint.deleteOne\",\"IndicatorPoint.deleteMany\",\"IndicatorPoint.groupBy\",\"IndicatorPoint.aggregate\",\"Econ_SowInventory.findUnique\",\"Econ_SowInventory.findUniqueOrThrow\",\"Econ_SowInventory.findFirst\",\"Econ_SowInventory.findFirstOrThrow\",\"Econ_SowInventory.findMany\",\"Econ_SowInventory.createOne\",\"Econ_SowInventory.createMany\",\"Econ_SowInventory.updateOne\",\"Econ_SowInventory.updateMany\",\"Econ_SowInventory.upsertOne\",\"Econ_SowInventory.deleteOne\",\"Econ_SowInventory.deleteMany\",\"Econ_SowInventory.groupBy\",\"Econ_SowInventory.aggregate\",\"ScraperCache.findUnique\",\"ScraperCache.findUniqueOrThrow\",\"ScraperCache.findFirst\",\"ScraperCache.findFirstOrThrow\",\"ScraperCache.findMany\",\"ScraperCache.createOne\",\"ScraperCache.createMany\",\"ScraperCache.updateOne\",\"ScraperCache.updateMany\",\"ScraperCache.upsertOne\",\"ScraperCache.deleteOne\",\"ScraperCache.deleteMany\",\"ScraperCache.groupBy\",\"ScraperCache.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"scraperName\",\"lastDataHash\",\"lastUpdateAt\",\"metadata\",\"createdAt\",\"updatedAt\",\"equals\",\"string_contains\",\"string_starts_with\",\"string_ends_with\",\"array_starts_with\",\"array_ends_with\",\"array_contains\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"in\",\"notIn\",\"contains\",\"startsWith\",\"endsWith\",\"search\",\"month\",\"inventory\",\"indicatorId\",\"period\",\"value\",\"name\",\"groupName\",\"title\",\"unit\",\"source\",\"frequency\",\"hidden\",\"every\",\"some\",\"none\",\"indicatorId_period\",\"description\",\"slug\",\"content\",\"date\",\"email\",\"password\",\"is\",\"isNot\",\"_relevance\",\"connectOrCreate\",\"upsert\",\"createMany\",\"set\",\"disconnect\",\"delete\",\"connect\",\"updateMany\",\"deleteMany\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), + graph: "nAI6YglwAADTAQAwcQAABAAQcgAA0wEAMHMCAAAAAXhAALkBACF5QAC5AQAhkQEBALcBACGgAQEAAAABoQEBALcBACEBAAAAAQAgAQAAAAEAIAlwAADTAQAwcQAABAAQcgAA0wEAMHMCALYBACF4QAC5AQAheUAAuQEAIZEBAQC3AQAhoAEBALcBACGhAQEAtwEAIQGkAQAAlgIAIAMAAAAEACADAAAFADAEAAABACADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAZzAgAAAAF4QAAAAAF5QAAAAAGRAQEAAAABoAEBAAAAAaEBAQAAAAEBCAAACQAgBnMCAAAAAXhAAAAAAXlAAAAAAZEBAQAAAAGgAQEAAAABoQEBAAAAAQEIAAALADAGcwIA3QEAIXhAANwBACF5QADcAQAhkQEBANoBACGgAQEA2gEAIaEBAQDaAQAhAgAAAAEAIAgAAA0AIAZzAgDdAQAheEAA3AEAIXlAANwBACGRAQEA2gE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AAAAAXhAALkBACF5QAC5AQAhjgECALYBACGPAQEAtwEAIZABCADJAQAhmwEAAMcBACADAAAASAAgAwAASQAwBAAASgAgAQAAAEgAIAEAAABGACAONwAAxgEAIHAAAMQBADBxAABOABByAADEAQAwcwIAtgEAIXhAALkBACF5QAC5AQAhkQEBALcBACGSAQEAtwEAIZMBAQC3AQAhlAEBALcBACGVAQEAtwEAIZYBAQC3AQAhlwEgAMUBACECNwAAgQIAIKQBAACCAgAgAwAAAE4AIAMAAE8AMAQAAEYAIAMAAABOACADAABPADAEAABGACADAAAATgAgAwAATwAwBAAARgAgCzcAAIACACBzAgAAAAF4QAAAAAF5QAAAAAGRAQEAAAABkgEBAAAAAZMBAQAAAAGUAQEAAAABlQEBAAAAAZYBAQAAAAGXASAAAAABAQgAAFMAIApzAgAAAAF4QAAAAAF5QAAAAAGRAQEAAAABkgEBAAAAAZMBAQAAAAGUAQEAAAABlQEBAAAAAZYBAQAAAAGXASAAAAABAQgAAFUAMAs3AADzAQAgcwIA3QEAIXhAANwBACF5QADcAQAhkQEBANoBACGSAQEA2gEAIZMBAQDaAQAhlAEBANoBACGVAQEA2gEAIZYBAQDaAQAhlwEgAPIBACECAAAARgAgCAAAVwAgCnMCAN0BACF4QADcAQAheUAA3AEAIZEBAQDaAQAhkgEBANoBACGTAQEA2gEAIZQBAQDaAQAhlQEBANoBACGWAQEA2gEAIZcBIADyAQAhAgAAAE4AIAgAAFkAIAMAAABGACANAABTACAOAABXACABAAAARgAgAQAAAE4AIAUTAADtAQAgFAAA7gEAIBUAAPEBACAWAADwAQAgFwAA7wEAIA1wAADAAQAwcQAAXwAQcgAAwAEAMHMCAKUBACF4QACoAQAheUAAqAEAIZEBAQCmAQAhkgEBAKYBACGTAQEApgEAIZQBAQCmAQAhlQEBAKYBACGWAQEApgEAIZcBIADBAQAhAwAAAE4AIAMAAF4AMBIAAF8AIAMAAABOACADAABPADAEAABGACABAAAASgAgAQAAAEoAIAMAAABIACADAABJADAEAABKACADAAAAS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AAfgAgDgAAggEAIAEAAAB2ACABAAAAeQAgBRMAAN8BACAUAADgAQAgFQAA4wEAIBYAAOIBACAXAADhAQAgCHAAALsBADBxAACKAQAQcgAAuwEAMHMCAKUBACF4QACoAQAheUAAqAEAIYwBAQCmAQAhjQECAKUBACEDAAAAeQAgAwAAiQEAMBIAAIoBACADAAAAeQAgAwAAegAwBAAAdgAgCnAAALUBADBxAACQAQAQcgAAtQEAMHMCAAAAAXQBAAAAAXUBALgBACF2QAC5AQAhdwAAugEAIHhAALkBACF5QAC5AQAhAQAAAI0BACABAAAAjQEAIApwAAC1AQAwcQAAkAEAEHIAALUBADBzAgC2AQAhdAEAtwEAIXUBALgBACF2QAC5AQAhdwAAugEAIHhAALkBACF5QAC5AQAhA3UAANQBACB3AADUAQAgpAEAAN4BACADAAAAkAEAIAMAAJEBADAEAACNAQAgAwAAAJABACADAACRAQAwBAAAjQEAIAMAAACQAQAgAwAAkQEAMAQAAI0BACAHcwIAAAABdAEAAAABdQEAAAABdkAAAAABd4AAAAABeEAAAAABeUAAAAABAQgAAJUBACAHcwIAAAABdAEAAAABdQEAAAABdkAAAAABd4AAAAABeEAAAAABeUAAAAABAQgAAJcBADAHcwIA3QEAIXQBANoBACF1AQDbAQAhdkAA3AEAIXeAAAAAAXhAANwBACF5QADcAQAhAgAAAI0BACAIAACZAQAgB3MCAN0BACF0AQDaAQAhdQEA2wEAIXZAANwBACF3gAAAAAF4QADcAQAheUAA3AEAIQIAAACQAQAgCAAAmwEAIAMAAACNAQAgDQAAlQEAIA4AAJkBACABAAAAjQEAIAEAAACQAQAgBxMAANUBACAUAADWAQAgFQAA2QEAIBYAANgBACAXAADXAQAgdQAA1AEAIHcAANQBACAKcAAApAEAMHEAAKEBABByAACkAQAwcwIApQEAIXQBAKYBACF1AQCnAQAhdkAAqAEAIXcAAKkBACB4QACoAQAheUAAqAEAIQMAAACQAQAgAwAAoAEAMBIAAKEBACADAAAAkAEAIAMAAJEBADAEAACNAQAgCnAAAKQBAD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USLDYSLTgSLjoCLzwSMD4CMT8SMkASM0ECNEQTNUUZOEcaOU0aOlAaO1EaPFIaPVQaPlYCP1gaQFoCQVsaQlwaQ10CRGAdRWEjRmIbR2MbSGQbSWUbSmYbS2gbTGoCTWwbTm4CT28bUHAbUXECUnQkU3UqVHcrVXgrVnsrV3wrWH0rWX8rWoEBAluDAStchQECXYYBK16HAStfiAECYIsBLGGMATJijgEzY48BM2SSATNlkwEzZpQBM2eWATNomAECaZoBM2qcAQJrnQEzbJ4BM22fAQJuogE0b6MBOg" } async function decodeBase64AsWasm(wasmBase64: string): Promise { @@ -228,6 +228,16 @@ export interface PrismaClient< */ get indicator(): Prisma.IndicatorDelegate; + /** + * `prisma.indicatorPoint`: Exposes CRUD operations for the **IndicatorPoint** model. + * Example usage: + * ```ts + * // Fetch zero or more IndicatorPoints + * const indicatorPoints = await prisma.indicatorPoint.findMany() + * ``` + */ + get indicatorPoint(): Prisma.IndicatorPointDelegate; + /** * `prisma.econ_SowInventory`: Exposes CRUD operations for the **Econ_SowInventory** model. * Example usage: diff --git a/generated/prisma/internal/prismaNamespace.ts b/generated/prisma/internal/prismaNamespace.ts index 1d3036b..b6104d1 100644 --- a/generated/prisma/internal/prismaNamespace.ts +++ b/generated/prisma/internal/prismaNamespace.ts @@ -388,6 +388,7 @@ export const ModelName = { Article: 'Article', Strategy: 'Strategy', Indicator: 'Indicator', + IndicatorPoint: 'IndicatorPoint', Econ_SowInventory: 'Econ_SowInventory', ScraperCache: 'ScraperCache' } as const @@ -405,7 +406,7 @@ export type TypeMap + fields: Prisma.IndicatorPointFieldRefs + operations: { + findUnique: { + args: Prisma.IndicatorPointFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.IndicatorPointFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.IndicatorPointFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.IndicatorPointFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.IndicatorPointFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.IndicatorPointCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.IndicatorPointCreateManyArgs + result: BatchPayload + } + delete: { + args: Prisma.IndicatorPointDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.IndicatorPointUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.IndicatorPointDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.IndicatorPointUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.IndicatorPointUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.IndicatorPointAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.IndicatorPointGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.IndicatorPointCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } Econ_SowInventory: { payload: Prisma.$Econ_SowInventoryPayload fields: Prisma.Econ_SowInventoryFieldRefs @@ -885,7 +952,11 @@ export const IndicatorScalarFieldEnum = { id: 'id', name: 'name', groupName: 'groupName', - data: 'data', + title: 'title', + unit: 'unit', + source: 'source', + frequency: 'frequency', + hidden: 'hidden', createdAt: 'createdAt', updatedAt: 'updatedAt' } as const @@ -893,6 +964,18 @@ export const IndicatorScalarFieldEnum = { export type IndicatorScalarFieldEnum = (typeof IndicatorScalarFieldEnum)[keyof typeof IndicatorScalarFieldEnum] +export const IndicatorPointScalarFieldEnum = { + id: 'id', + indicatorId: 'indicatorId', + period: 'period', + value: 'value', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type IndicatorPointScalarFieldEnum = (typeof IndicatorPointScalarFieldEnum)[keyof typeof IndicatorPointScalarFieldEnum] + + export const Econ_SowInventoryScalarFieldEnum = { id: 'id', month: 'month', @@ -986,12 +1069,23 @@ export type StrategyOrderByRelevanceFieldEnum = (typeof StrategyOrderByRelevance export const IndicatorOrderByRelevanceFieldEnum = { name: 'name', - groupName: 'groupName' + groupName: 'groupName', + title: 'title', + unit: 'unit', + source: 'source', + frequency: 'frequency' } as const export type IndicatorOrderByRelevanceFieldEnum = (typeof IndicatorOrderByRelevanceFieldEnum)[keyof typeof IndicatorOrderByRelevanceFieldEnum] +export const IndicatorPointOrderByRelevanceFieldEnum = { + period: 'period' +} as const + +export type IndicatorPointOrderByRelevanceFieldEnum = (typeof IndicatorPointOrderByRelevanceFieldEnum)[keyof typeof IndicatorPointOrderByRelevanceFieldEnum] + + export const Econ_SowInventoryOrderByRelevanceFieldEnum = { month: 'month' } as const @@ -1056,6 +1150,13 @@ export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$Prisma +/** + * Reference to a field of type 'Boolean' + */ +export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + /** * Reference to a field of type 'Float' */ @@ -1161,6 +1262,7 @@ export type GlobalOmitConfig = { article?: Prisma.ArticleOmit strategy?: Prisma.StrategyOmit indicator?: Prisma.IndicatorOmit + indicatorPoint?: Prisma.IndicatorPointOmit econ_SowInventory?: Prisma.Econ_SowInventoryOmit scraperCache?: Prisma.ScraperCacheOmit } diff --git a/generated/prisma/internal/prismaNamespaceBrowser.ts b/generated/prisma/internal/prismaNamespaceBrowser.ts index a490d3b..292b644 100644 --- a/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -55,6 +55,7 @@ export const ModelName = { Article: 'Article', Strategy: 'Strategy', Indicator: 'Indicator', + IndicatorPoint: 'IndicatorPoint', Econ_SowInventory: 'Econ_SowInventory', ScraperCache: 'ScraperCache' } as const @@ -116,7 +117,11 @@ export const IndicatorScalarFieldEnum = { id: 'id', name: 'name', groupName: 'groupName', - data: 'data', + title: 'title', + unit: 'unit', + source: 'source', + frequency: 'frequency', + hidden: 'hidden', createdAt: 'createdAt', updatedAt: 'updatedAt' } as const @@ -124,6 +129,18 @@ export const IndicatorScalarFieldEnum = { export type IndicatorScalarFieldEnum = (typeof IndicatorScalarFieldEnum)[keyof typeof IndicatorScalarFieldEnum] +export const IndicatorPointScalarFieldEnum = { + id: 'id', + indicatorId: 'indicatorId', + period: 'period', + value: 'value', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type IndicatorPointScalarFieldEnum = (typeof IndicatorPointScalarFieldEnum)[keyof typeof IndicatorPointScalarFieldEnum] + + export const Econ_SowInventoryScalarFieldEnum = { id: 'id', month: 'month', @@ -217,12 +234,23 @@ export type StrategyOrderByRelevanceFieldEnum = (typeof StrategyOrderByRelevance export const IndicatorOrderByRelevanceFieldEnum = { name: 'name', - groupName: 'groupName' + groupName: 'groupName', + title: 'title', + unit: 'unit', + source: 'source', + frequency: 'frequency' } as const export type IndicatorOrderByRelevanceFieldEnum = (typeof IndicatorOrderByRelevanceFieldEnum)[keyof typeof IndicatorOrderByRelevanceFieldEnum] +export const IndicatorPointOrderByRelevanceFieldEnum = { + period: 'period' +} as const + +export type IndicatorPointOrderByRelevanceFieldEnum = (typeof IndicatorPointOrderByRelevanceFieldEnum)[keyof typeof IndicatorPointOrderByRelevanceFieldEnum] + + export const Econ_SowInventoryOrderByRelevanceFieldEnum = { month: 'month' } as const diff --git a/generated/prisma/models.ts b/generated/prisma/models.ts index 127107b..9ee485c 100644 --- a/generated/prisma/models.ts +++ b/generated/prisma/models.ts @@ -12,6 +12,7 @@ export type * from './models/User.ts' export type * from './models/Article.ts' export type * from './models/Strategy.ts' export type * from './models/Indicator.ts' +export type * from './models/IndicatorPoint.ts' export type * from './models/Econ_SowInventory.ts' export type * from './models/ScraperCache.ts' export type * from './commonInputTypes.ts' \ No newline at end of file diff --git a/generated/prisma/models/Indicator.ts b/generated/prisma/models/Indicator.ts index 472a992..07a1e90 100644 --- a/generated/prisma/models/Indicator.ts +++ b/generated/prisma/models/Indicator.ts @@ -38,6 +38,11 @@ export type IndicatorMinAggregateOutputType = { id: number | null name: string | null groupName: string | null + title: string | null + unit: string | null + source: string | null + frequency: string | null + hidden: boolean | null createdAt: Date | null updatedAt: Date | null } @@ -46,6 +51,11 @@ export type IndicatorMaxAggregateOutputType = { id: number | null name: string | null groupName: string | null + title: string | null + unit: string | null + source: string | null + frequency: string | null + hidden: boolean | null createdAt: Date | null updatedAt: Date | null } @@ -54,7 +64,11 @@ export type IndicatorCountAggregateOutputType = { id: number name: number groupName: number - data: number + title: number + unit: number + source: number + frequency: number + hidden: number createdAt: number updatedAt: number _all: number @@ -73,6 +87,11 @@ export type IndicatorMinAggregateInputType = { id?: true name?: true groupName?: true + title?: true + unit?: true + source?: true + frequency?: true + hidden?: true createdAt?: true updatedAt?: true } @@ -81,6 +100,11 @@ export type IndicatorMaxAggregateInputType = { id?: true name?: true groupName?: true + title?: true + unit?: true + source?: true + frequency?: true + hidden?: true createdAt?: true updatedAt?: true } @@ -89,7 +113,11 @@ export type IndicatorCountAggregateInputType = { id?: true name?: true groupName?: true - data?: true + title?: true + unit?: true + source?: true + frequency?: true + hidden?: true createdAt?: true updatedAt?: true _all?: true @@ -185,7 +213,11 @@ export type IndicatorGroupByOutputType = { id: number name: string groupName: string - data: runtime.JsonValue + title: string + unit: string + source: string + frequency: string + hidden: boolean createdAt: Date updatedAt: Date _count: IndicatorCountAggregateOutputType | null @@ -217,18 +249,28 @@ export type IndicatorWhereInput = { id?: Prisma.IntFilter<"Indicator"> | number name?: Prisma.StringFilter<"Indicator"> | string groupName?: Prisma.StringFilter<"Indicator"> | string - data?: Prisma.JsonFilter<"Indicator"> + title?: Prisma.StringFilter<"Indicator"> | string + unit?: Prisma.StringFilter<"Indicator"> | string + source?: Prisma.StringFilter<"Indicator"> | string + frequency?: Prisma.StringFilter<"Indicator"> | string + hidden?: Prisma.BoolFilter<"Indicator"> | boolean createdAt?: Prisma.DateTimeFilter<"Indicator"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Indicator"> | Date | string + points?: Prisma.IndicatorPointListRelationFilter } export type IndicatorOrderByWithRelationInput = { id?: Prisma.SortOrder name?: Prisma.SortOrder groupName?: Prisma.SortOrder - data?: Prisma.SortOrder + title?: Prisma.SortOrder + unit?: Prisma.SortOrder + source?: Prisma.SortOrder + frequency?: Prisma.SortOrder + hidden?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder + points?: Prisma.IndicatorPointOrderByRelationAggregateInput _relevance?: Prisma.IndicatorOrderByRelevanceInput } @@ -239,16 +281,25 @@ export type IndicatorWhereUniqueInput = Prisma.AtLeast<{ OR?: Prisma.IndicatorWhereInput[] NOT?: Prisma.IndicatorWhereInput | Prisma.IndicatorWhereInput[] groupName?: Prisma.StringFilter<"Indicator"> | string - data?: Prisma.JsonFilter<"Indicator"> + title?: Prisma.StringFilter<"Indicator"> | string + unit?: Prisma.StringFilter<"Indicator"> | string + source?: Prisma.StringFilter<"Indicator"> | string + frequency?: Prisma.StringFilter<"Indicator"> | string + hidden?: Prisma.BoolFilter<"Indicator"> | boolean createdAt?: Prisma.DateTimeFilter<"Indicator"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Indicator"> | Date | string + points?: Prisma.IndicatorPointListRelationFilter }, "id" | "name"> export type IndicatorOrderByWithAggregationInput = { id?: Prisma.SortOrder name?: Prisma.SortOrder groupName?: Prisma.SortOrder - data?: Prisma.SortOrder + title?: Prisma.SortOrder + unit?: Prisma.SortOrder + source?: Prisma.SortOrder + frequency?: Prisma.SortOrder + hidden?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder _count?: Prisma.IndicatorCountOrderByAggregateInput @@ -265,7 +316,11 @@ export type IndicatorScalarWhereWithAggregatesInput = { id?: Prisma.IntWithAggregatesFilter<"Indicator"> | number name?: Prisma.StringWithAggregatesFilter<"Indicator"> | string groupName?: Prisma.StringWithAggregatesFilter<"Indicator"> | string - data?: Prisma.JsonWithAggregatesFilter<"Indicator"> + title?: Prisma.StringWithAggregatesFilter<"Indicator"> | string + unit?: Prisma.StringWithAggregatesFilter<"Indicator"> | string + source?: Prisma.StringWithAggregatesFilter<"Indicator"> | string + frequency?: Prisma.StringWithAggregatesFilter<"Indicator"> | string + hidden?: Prisma.BoolWithAggregatesFilter<"Indicator"> | boolean createdAt?: Prisma.DateTimeWithAggregatesFilter<"Indicator"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Indicator"> | Date | string } @@ -273,42 +328,66 @@ export type IndicatorScalarWhereWithAggregatesInput = { export type IndicatorCreateInput = { name: string groupName: string - data: Prisma.JsonNullValueInput | runtime.InputJsonValue + title?: string + unit?: string + source?: string + frequency?: string + hidden?: boolean createdAt?: Date | string updatedAt?: Date | string + points?: Prisma.IndicatorPointCreateNestedManyWithoutIndicatorInput } export type IndicatorUncheckedCreateInput = { id?: number name: string groupName: string - data: Prisma.JsonNullValueInput | runtime.InputJsonValue + title?: string + unit?: string + source?: string + frequency?: string + hidden?: boolean createdAt?: Date | string updatedAt?: Date | string + points?: Prisma.IndicatorPointUncheckedCreateNestedManyWithoutIndicatorInput } export type IndicatorUpdateInput = { name?: Prisma.StringFieldUpdateOperationsInput | string groupName?: Prisma.StringFieldUpdateOperationsInput | string - data?: Prisma.JsonNullValueInput | runtime.InputJsonValue + title?: Prisma.StringFieldUpdateOperationsInput | string + unit?: Prisma.StringFieldUpdateOperationsInput | string + source?: Prisma.StringFieldUpdateOperationsInput | string + frequency?: Prisma.StringFieldUpdateOperationsInput | string + hidden?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + points?: Prisma.IndicatorPointUpdateManyWithoutIndicatorNestedInput } export type IndicatorUncheckedUpdateInput = { id?: Prisma.IntFieldUpdateOperationsInput | number name?: Prisma.StringFieldUpdateOperationsInput | string groupName?: Prisma.StringFieldUpdateOperationsInput | string - data?: Prisma.JsonNullValueInput | runtime.InputJsonValue + title?: Prisma.StringFieldUpdateOperationsInput | string + unit?: Prisma.StringFieldUpdateOperationsInput | string + source?: Prisma.StringFieldUpdateOperationsInput | string + frequency?: Prisma.StringFieldUpdateOperationsInput | string + hidden?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + points?: Prisma.IndicatorPointUncheckedUpdateManyWithoutIndicatorNestedInput } export type IndicatorCreateManyInput = { id?: number name: string groupName: string - data: Prisma.JsonNullValueInput | runtime.InputJsonValue + title?: string + unit?: string + source?: string + frequency?: string + hidden?: boolean createdAt?: Date | string updatedAt?: Date | string } @@ -316,7 +395,11 @@ export type IndicatorCreateManyInput = { export type IndicatorUpdateManyMutationInput = { name?: Prisma.StringFieldUpdateOperationsInput | string groupName?: Prisma.StringFieldUpdateOperationsInput | string - data?: Prisma.JsonNullValueInput | runtime.InputJsonValue + title?: Prisma.StringFieldUpdateOperationsInput | string + unit?: Prisma.StringFieldUpdateOperationsInput | string + source?: Prisma.StringFieldUpdateOperationsInput | string + frequency?: Prisma.StringFieldUpdateOperationsInput | string + hidden?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } @@ -325,7 +408,11 @@ export type IndicatorUncheckedUpdateManyInput = { id?: Prisma.IntFieldUpdateOperationsInput | number name?: Prisma.StringFieldUpdateOperationsInput | string groupName?: Prisma.StringFieldUpdateOperationsInput | string - data?: Prisma.JsonNullValueInput | runtime.InputJsonValue + title?: Prisma.StringFieldUpdateOperationsInput | string + unit?: Prisma.StringFieldUpdateOperationsInput | string + source?: Prisma.StringFieldUpdateOperationsInput | string + frequency?: Prisma.StringFieldUpdateOperationsInput | string + hidden?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } @@ -340,7 +427,11 @@ export type IndicatorCountOrderByAggregateInput = { id?: Prisma.SortOrder name?: Prisma.SortOrder groupName?: Prisma.SortOrder - data?: Prisma.SortOrder + title?: Prisma.SortOrder + unit?: Prisma.SortOrder + source?: Prisma.SortOrder + frequency?: Prisma.SortOrder + hidden?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } @@ -353,6 +444,11 @@ export type IndicatorMaxOrderByAggregateInput = { id?: Prisma.SortOrder name?: Prisma.SortOrder groupName?: Prisma.SortOrder + title?: Prisma.SortOrder + unit?: Prisma.SortOrder + source?: Prisma.SortOrder + frequency?: Prisma.SortOrder + hidden?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } @@ -361,6 +457,11 @@ export type IndicatorMinOrderByAggregateInput = { id?: Prisma.SortOrder name?: Prisma.SortOrder groupName?: Prisma.SortOrder + title?: Prisma.SortOrder + unit?: Prisma.SortOrder + source?: Prisma.SortOrder + frequency?: Prisma.SortOrder + hidden?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder } @@ -369,15 +470,139 @@ export type IndicatorSumOrderByAggregateInput = { id?: Prisma.SortOrder } +export type IndicatorScalarRelationFilter = { + is?: Prisma.IndicatorWhereInput + isNot?: Prisma.IndicatorWhereInput +} + +export type BoolFieldUpdateOperationsInput = { + set?: boolean +} + +export type IndicatorCreateNestedOneWithoutPointsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.IndicatorCreateOrConnectWithoutPointsInput + connect?: Prisma.IndicatorWhereUniqueInput +} + +export type IndicatorUpdateOneRequiredWithoutPointsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.IndicatorCreateOrConnectWithoutPointsInput + upsert?: Prisma.IndicatorUpsertWithoutPointsInput + connect?: Prisma.IndicatorWhereUniqueInput + update?: Prisma.XOR, Prisma.IndicatorUncheckedUpdateWithoutPointsInput> +} + +export type IndicatorCreateWithoutPointsInput = { + name: string + groupName: string + title?: string + unit?: string + source?: string + frequency?: string + hidden?: boolean + createdAt?: Date | string + updatedAt?: Date | string +} + +export type IndicatorUncheckedCreateWithoutPointsInput = { + id?: number + name: string + groupName: string + title?: string + unit?: string + source?: string + frequency?: string + hidden?: boolean + createdAt?: Date | string + updatedAt?: Date | string +} + +export type IndicatorCreateOrConnectWithoutPointsInput = { + where: Prisma.IndicatorWhereUniqueInput + create: Prisma.XOR +} + +export type IndicatorUpsertWithoutPointsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.IndicatorWhereInput +} + +export type IndicatorUpdateToOneWithWhereWithoutPointsInput = { + where?: Prisma.IndicatorWhereInput + data: Prisma.XOR +} + +export type IndicatorUpdateWithoutPointsInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + groupName?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + unit?: Prisma.StringFieldUpdateOperationsInput | string + source?: Prisma.StringFieldUpdateOperationsInput | string + frequency?: Prisma.StringFieldUpdateOperationsInput | string + hidden?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type IndicatorUncheckedUpdateWithoutPointsInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + groupName?: Prisma.StringFieldUpdateOperationsInput | string + title?: Prisma.StringFieldUpdateOperationsInput | string + unit?: Prisma.StringFieldUpdateOperationsInput | string + source?: Prisma.StringFieldUpdateOperationsInput | string + frequency?: Prisma.StringFieldUpdateOperationsInput | string + hidden?: Prisma.BoolFieldUpdateOperationsInput | boolean + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + +/** + * Count Type IndicatorCountOutputType + */ + +export type IndicatorCountOutputType = { + points: number +} + +export type IndicatorCountOutputTypeSelect = { + points?: boolean | IndicatorCountOutputTypeCountPointsArgs +} + +/** + * IndicatorCountOutputType without action + */ +export type IndicatorCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the IndicatorCountOutputType + */ + select?: Prisma.IndicatorCountOutputTypeSelect | null +} + +/** + * IndicatorCountOutputType without action + */ +export type IndicatorCountOutputTypeCountPointsArgs = { + where?: Prisma.IndicatorPointWhereInput +} export type IndicatorSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean name?: boolean groupName?: boolean - data?: boolean + title?: boolean + unit?: boolean + source?: boolean + frequency?: boolean + hidden?: boolean createdAt?: boolean updatedAt?: boolean + points?: boolean | Prisma.Indicator$pointsArgs + _count?: boolean | Prisma.IndicatorCountOutputTypeDefaultArgs }, ExtArgs["result"]["indicator"]> @@ -386,21 +611,35 @@ export type IndicatorSelectScalar = { id?: boolean name?: boolean groupName?: boolean - data?: boolean + title?: boolean + unit?: boolean + source?: boolean + frequency?: boolean + hidden?: boolean createdAt?: boolean updatedAt?: boolean } -export type IndicatorOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "groupName" | "data" | "createdAt" | "updatedAt", ExtArgs["result"]["indicator"]> +export type IndicatorOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "groupName" | "title" | "unit" | "source" | "frequency" | "hidden" | "createdAt" | "updatedAt", ExtArgs["result"]["indicator"]> +export type IndicatorInclude = { + points?: boolean | Prisma.Indicator$pointsArgs + _count?: boolean | Prisma.IndicatorCountOutputTypeDefaultArgs +} export type $IndicatorPayload = { name: "Indicator" - objects: {} + objects: { + points: Prisma.$IndicatorPointPayload[] + } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number name: string groupName: string - data: runtime.JsonValue + title: string + unit: string + source: string + frequency: string + hidden: boolean createdAt: Date updatedAt: Date }, ExtArgs["result"]["indicator"]> @@ -743,6 +982,7 @@ readonly fields: IndicatorFieldRefs; */ export interface Prisma__IndicatorClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + points = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -775,7 +1015,11 @@ export interface IndicatorFieldRefs { readonly id: Prisma.FieldRef<"Indicator", 'Int'> readonly name: Prisma.FieldRef<"Indicator", 'String'> readonly groupName: Prisma.FieldRef<"Indicator", 'String'> - readonly data: Prisma.FieldRef<"Indicator", 'Json'> + readonly title: Prisma.FieldRef<"Indicator", 'String'> + readonly unit: Prisma.FieldRef<"Indicator", 'String'> + readonly source: Prisma.FieldRef<"Indicator", 'String'> + readonly frequency: Prisma.FieldRef<"Indicator", 'String'> + readonly hidden: Prisma.FieldRef<"Indicator", 'Boolean'> readonly createdAt: Prisma.FieldRef<"Indicator", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Indicator", 'DateTime'> } @@ -794,6 +1038,10 @@ export type IndicatorFindUniqueArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * Filter, which Indicator to fetch. */ @@ -812,6 +1060,10 @@ export type IndicatorFindUniqueOrThrowArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * Filter, which Indicator to fetch. */ @@ -830,6 +1082,10 @@ export type IndicatorFindFirstArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * Filter, which Indicator to fetch. */ @@ -878,6 +1134,10 @@ export type IndicatorFindFirstOrThrowArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * Filter, which Indicator to fetch. */ @@ -926,6 +1186,10 @@ export type IndicatorFindManyArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * Filter, which Indicators to fetch. */ @@ -974,6 +1238,10 @@ export type IndicatorCreateArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * The data needed to create a Indicator. */ @@ -1003,6 +1271,10 @@ export type IndicatorUpdateArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * The data needed to update a Indicator. */ @@ -1043,6 +1315,10 @@ export type IndicatorUpsertArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * The filter to search for the Indicator to update in case it exists. */ @@ -1069,6 +1345,10 @@ export type IndicatorDeleteArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null /** * Filter which Indicator to delete. */ @@ -1089,6 +1369,30 @@ export type IndicatorDeleteManyArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + where?: Prisma.IndicatorPointWhereInput + orderBy?: Prisma.IndicatorPointOrderByWithRelationInput | Prisma.IndicatorPointOrderByWithRelationInput[] + cursor?: Prisma.IndicatorPointWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.IndicatorPointScalarFieldEnum | Prisma.IndicatorPointScalarFieldEnum[] +} + /** * Indicator without action */ @@ -1101,4 +1405,8 @@ export type IndicatorDefaultArgs | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorInclude | null } diff --git a/generated/prisma/models/IndicatorPoint.ts b/generated/prisma/models/IndicatorPoint.ts new file mode 100644 index 0000000..45c9fda --- /dev/null +++ b/generated/prisma/models/IndicatorPoint.ts @@ -0,0 +1,1321 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `IndicatorPoint` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.ts" +import type * as Prisma from "../internal/prismaNamespace.ts" + +/** + * Model IndicatorPoint + * + */ +export type IndicatorPointModel = runtime.Types.Result.DefaultSelection + +export type AggregateIndicatorPoint = { + _count: IndicatorPointCountAggregateOutputType | null + _avg: IndicatorPointAvgAggregateOutputType | null + _sum: IndicatorPointSumAggregateOutputType | null + _min: IndicatorPointMinAggregateOutputType | null + _max: IndicatorPointMaxAggregateOutputType | null +} + +export type IndicatorPointAvgAggregateOutputType = { + id: number | null + indicatorId: number | null + value: number | null +} + +export type IndicatorPointSumAggregateOutputType = { + id: number | null + indicatorId: number | null + value: number | null +} + +export type IndicatorPointMinAggregateOutputType = { + id: number | null + indicatorId: number | null + period: string | null + value: number | null + createdAt: Date | null + updatedAt: Date | null +} + +export type IndicatorPointMaxAggregateOutputType = { + id: number | null + indicatorId: number | null + period: string | null + value: number | null + createdAt: Date | null + updatedAt: Date | null +} + +export type IndicatorPointCountAggregateOutputType = { + id: number + indicatorId: number + period: number + value: number + createdAt: number + updatedAt: number + _all: number +} + + +export type IndicatorPointAvgAggregateInputType = { + id?: true + indicatorId?: true + value?: true +} + +export type IndicatorPointSumAggregateInputType = { + id?: true + indicatorId?: true + value?: true +} + +export type IndicatorPointMinAggregateInputType = { + id?: true + indicatorId?: true + period?: true + value?: true + createdAt?: true + updatedAt?: true +} + +export type IndicatorPointMaxAggregateInputType = { + id?: true + indicatorId?: true + period?: true + value?: true + createdAt?: true + updatedAt?: true +} + +export type IndicatorPointCountAggregateInputType = { + id?: true + indicatorId?: true + period?: true + value?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type IndicatorPointAggregateArgs = { + /** + * Filter which IndicatorPoint to aggregate. + */ + where?: Prisma.IndicatorPointWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of IndicatorPoints to fetch. + */ + orderBy?: Prisma.IndicatorPointOrderByWithRelationInput | Prisma.IndicatorPointOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.IndicatorPointWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` IndicatorPoints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` IndicatorPoints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned IndicatorPoints + **/ + _count?: true | IndicatorPointCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: IndicatorPointAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: IndicatorPointSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: IndicatorPointMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: IndicatorPointMaxAggregateInputType +} + +export type GetIndicatorPointAggregateType = { + [P in keyof T & keyof AggregateIndicatorPoint]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type IndicatorPointGroupByArgs = { + where?: Prisma.IndicatorPointWhereInput + orderBy?: Prisma.IndicatorPointOrderByWithAggregationInput | Prisma.IndicatorPointOrderByWithAggregationInput[] + by: Prisma.IndicatorPointScalarFieldEnum[] | Prisma.IndicatorPointScalarFieldEnum + having?: Prisma.IndicatorPointScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: IndicatorPointCountAggregateInputType | true + _avg?: IndicatorPointAvgAggregateInputType + _sum?: IndicatorPointSumAggregateInputType + _min?: IndicatorPointMinAggregateInputType + _max?: IndicatorPointMaxAggregateInputType +} + +export type IndicatorPointGroupByOutputType = { + id: number + indicatorId: number + period: string + value: number + createdAt: Date + updatedAt: Date + _count: IndicatorPointCountAggregateOutputType | null + _avg: IndicatorPointAvgAggregateOutputType | null + _sum: IndicatorPointSumAggregateOutputType | null + _min: IndicatorPointMinAggregateOutputType | null + _max: IndicatorPointMaxAggregateOutputType | null +} + +export type GetIndicatorPointGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof IndicatorPointGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type IndicatorPointWhereInput = { + AND?: Prisma.IndicatorPointWhereInput | Prisma.IndicatorPointWhereInput[] + OR?: Prisma.IndicatorPointWhereInput[] + NOT?: Prisma.IndicatorPointWhereInput | Prisma.IndicatorPointWhereInput[] + id?: Prisma.IntFilter<"IndicatorPoint"> | number + indicatorId?: Prisma.IntFilter<"IndicatorPoint"> | number + period?: Prisma.StringFilter<"IndicatorPoint"> | string + value?: Prisma.FloatFilter<"IndicatorPoint"> | number + createdAt?: Prisma.DateTimeFilter<"IndicatorPoint"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"IndicatorPoint"> | Date | string + indicator?: Prisma.XOR +} + +export type IndicatorPointOrderByWithRelationInput = { + id?: Prisma.SortOrder + indicatorId?: Prisma.SortOrder + period?: Prisma.SortOrder + value?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + indicator?: Prisma.IndicatorOrderByWithRelationInput + _relevance?: Prisma.IndicatorPointOrderByRelevanceInput +} + +export type IndicatorPointWhereUniqueInput = Prisma.AtLeast<{ + id?: number + indicatorId_period?: Prisma.IndicatorPointIndicatorIdPeriodCompoundUniqueInput + AND?: Prisma.IndicatorPointWhereInput | Prisma.IndicatorPointWhereInput[] + OR?: Prisma.IndicatorPointWhereInput[] + NOT?: Prisma.IndicatorPointWhereInput | Prisma.IndicatorPointWhereInput[] + indicatorId?: Prisma.IntFilter<"IndicatorPoint"> | number + period?: Prisma.StringFilter<"IndicatorPoint"> | string + value?: Prisma.FloatFilter<"IndicatorPoint"> | number + createdAt?: Prisma.DateTimeFilter<"IndicatorPoint"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"IndicatorPoint"> | Date | string + indicator?: Prisma.XOR +}, "id" | "indicatorId_period"> + +export type IndicatorPointOrderByWithAggregationInput = { + id?: Prisma.SortOrder + indicatorId?: Prisma.SortOrder + period?: Prisma.SortOrder + value?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.IndicatorPointCountOrderByAggregateInput + _avg?: Prisma.IndicatorPointAvgOrderByAggregateInput + _max?: Prisma.IndicatorPointMaxOrderByAggregateInput + _min?: Prisma.IndicatorPointMinOrderByAggregateInput + _sum?: Prisma.IndicatorPointSumOrderByAggregateInput +} + +export type IndicatorPointScalarWhereWithAggregatesInput = { + AND?: Prisma.IndicatorPointScalarWhereWithAggregatesInput | Prisma.IndicatorPointScalarWhereWithAggregatesInput[] + OR?: Prisma.IndicatorPointScalarWhereWithAggregatesInput[] + NOT?: Prisma.IndicatorPointScalarWhereWithAggregatesInput | Prisma.IndicatorPointScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"IndicatorPoint"> | number + indicatorId?: Prisma.IntWithAggregatesFilter<"IndicatorPoint"> | number + period?: Prisma.StringWithAggregatesFilter<"IndicatorPoint"> | string + value?: Prisma.FloatWithAggregatesFilter<"IndicatorPoint"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"IndicatorPoint"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"IndicatorPoint"> | Date | string +} + +export type IndicatorPointCreateInput = { + period: string + value: number + createdAt?: Date | string + updatedAt?: Date | string + indicator: Prisma.IndicatorCreateNestedOneWithoutPointsInput +} + +export type IndicatorPointUncheckedCreateInput = { + id?: number + indicatorId: number + period: string + value: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type IndicatorPointUpdateInput = { + period?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.FloatFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + indicator?: Prisma.IndicatorUpdateOneRequiredWithoutPointsNestedInput +} + +export type IndicatorPointUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + indicatorId?: Prisma.IntFieldUpdateOperationsInput | number + period?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.FloatFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type IndicatorPointCreateManyInput = { + id?: number + indicatorId: number + period: string + value: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type IndicatorPointUpdateManyMutationInput = { + period?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.FloatFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type IndicatorPointUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + indicatorId?: Prisma.IntFieldUpdateOperationsInput | number + period?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.FloatFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type IndicatorPointListRelationFilter = { + every?: Prisma.IndicatorPointWhereInput + some?: Prisma.IndicatorPointWhereInput + none?: Prisma.IndicatorPointWhereInput +} + +export type IndicatorPointOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type IndicatorPointOrderByRelevanceInput = { + fields: Prisma.IndicatorPointOrderByRelevanceFieldEnum | Prisma.IndicatorPointOrderByRelevanceFieldEnum[] + sort: Prisma.SortOrder + search: string +} + +export type IndicatorPointIndicatorIdPeriodCompoundUniqueInput = { + indicatorId: number + period: string +} + +export type IndicatorPointCountOrderByAggregateInput = { + id?: Prisma.SortOrder + indicatorId?: Prisma.SortOrder + period?: Prisma.SortOrder + value?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type IndicatorPointAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + indicatorId?: Prisma.SortOrder + value?: Prisma.SortOrder +} + +export type IndicatorPointMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + indicatorId?: Prisma.SortOrder + period?: Prisma.SortOrder + value?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type IndicatorPointMinOrderByAggregateInput = { + id?: Prisma.SortOrder + indicatorId?: Prisma.SortOrder + period?: Prisma.SortOrder + value?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type IndicatorPointSumOrderByAggregateInput = { + id?: Prisma.SortOrder + indicatorId?: Prisma.SortOrder + value?: Prisma.SortOrder +} + +export type IndicatorPointCreateNestedManyWithoutIndicatorInput = { + create?: Prisma.XOR | Prisma.IndicatorPointCreateWithoutIndicatorInput[] | Prisma.IndicatorPointUncheckedCreateWithoutIndicatorInput[] + connectOrCreate?: Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput | Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput[] + createMany?: Prisma.IndicatorPointCreateManyIndicatorInputEnvelope + connect?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] +} + +export type IndicatorPointUncheckedCreateNestedManyWithoutIndicatorInput = { + create?: Prisma.XOR | Prisma.IndicatorPointCreateWithoutIndicatorInput[] | Prisma.IndicatorPointUncheckedCreateWithoutIndicatorInput[] + connectOrCreate?: Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput | Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput[] + createMany?: Prisma.IndicatorPointCreateManyIndicatorInputEnvelope + connect?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] +} + +export type IndicatorPointUpdateManyWithoutIndicatorNestedInput = { + create?: Prisma.XOR | Prisma.IndicatorPointCreateWithoutIndicatorInput[] | Prisma.IndicatorPointUncheckedCreateWithoutIndicatorInput[] + connectOrCreate?: Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput | Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput[] + upsert?: Prisma.IndicatorPointUpsertWithWhereUniqueWithoutIndicatorInput | Prisma.IndicatorPointUpsertWithWhereUniqueWithoutIndicatorInput[] + createMany?: Prisma.IndicatorPointCreateManyIndicatorInputEnvelope + set?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + disconnect?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + delete?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + connect?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + update?: Prisma.IndicatorPointUpdateWithWhereUniqueWithoutIndicatorInput | Prisma.IndicatorPointUpdateWithWhereUniqueWithoutIndicatorInput[] + updateMany?: Prisma.IndicatorPointUpdateManyWithWhereWithoutIndicatorInput | Prisma.IndicatorPointUpdateManyWithWhereWithoutIndicatorInput[] + deleteMany?: Prisma.IndicatorPointScalarWhereInput | Prisma.IndicatorPointScalarWhereInput[] +} + +export type IndicatorPointUncheckedUpdateManyWithoutIndicatorNestedInput = { + create?: Prisma.XOR | Prisma.IndicatorPointCreateWithoutIndicatorInput[] | Prisma.IndicatorPointUncheckedCreateWithoutIndicatorInput[] + connectOrCreate?: Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput | Prisma.IndicatorPointCreateOrConnectWithoutIndicatorInput[] + upsert?: Prisma.IndicatorPointUpsertWithWhereUniqueWithoutIndicatorInput | Prisma.IndicatorPointUpsertWithWhereUniqueWithoutIndicatorInput[] + createMany?: Prisma.IndicatorPointCreateManyIndicatorInputEnvelope + set?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + disconnect?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + delete?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + connect?: Prisma.IndicatorPointWhereUniqueInput | Prisma.IndicatorPointWhereUniqueInput[] + update?: Prisma.IndicatorPointUpdateWithWhereUniqueWithoutIndicatorInput | Prisma.IndicatorPointUpdateWithWhereUniqueWithoutIndicatorInput[] + updateMany?: Prisma.IndicatorPointUpdateManyWithWhereWithoutIndicatorInput | Prisma.IndicatorPointUpdateManyWithWhereWithoutIndicatorInput[] + deleteMany?: Prisma.IndicatorPointScalarWhereInput | Prisma.IndicatorPointScalarWhereInput[] +} + +export type FloatFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type IndicatorPointCreateWithoutIndicatorInput = { + period: string + value: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type IndicatorPointUncheckedCreateWithoutIndicatorInput = { + id?: number + period: string + value: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type IndicatorPointCreateOrConnectWithoutIndicatorInput = { + where: Prisma.IndicatorPointWhereUniqueInput + create: Prisma.XOR +} + +export type IndicatorPointCreateManyIndicatorInputEnvelope = { + data: Prisma.IndicatorPointCreateManyIndicatorInput | Prisma.IndicatorPointCreateManyIndicatorInput[] + skipDuplicates?: boolean +} + +export type IndicatorPointUpsertWithWhereUniqueWithoutIndicatorInput = { + where: Prisma.IndicatorPointWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type IndicatorPointUpdateWithWhereUniqueWithoutIndicatorInput = { + where: Prisma.IndicatorPointWhereUniqueInput + data: Prisma.XOR +} + +export type IndicatorPointUpdateManyWithWhereWithoutIndicatorInput = { + where: Prisma.IndicatorPointScalarWhereInput + data: Prisma.XOR +} + +export type IndicatorPointScalarWhereInput = { + AND?: Prisma.IndicatorPointScalarWhereInput | Prisma.IndicatorPointScalarWhereInput[] + OR?: Prisma.IndicatorPointScalarWhereInput[] + NOT?: Prisma.IndicatorPointScalarWhereInput | Prisma.IndicatorPointScalarWhereInput[] + id?: Prisma.IntFilter<"IndicatorPoint"> | number + indicatorId?: Prisma.IntFilter<"IndicatorPoint"> | number + period?: Prisma.StringFilter<"IndicatorPoint"> | string + value?: Prisma.FloatFilter<"IndicatorPoint"> | number + createdAt?: Prisma.DateTimeFilter<"IndicatorPoint"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"IndicatorPoint"> | Date | string +} + +export type IndicatorPointCreateManyIndicatorInput = { + id?: number + period: string + value: number + createdAt?: Date | string + updatedAt?: Date | string +} + +export type IndicatorPointUpdateWithoutIndicatorInput = { + period?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.FloatFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type IndicatorPointUncheckedUpdateWithoutIndicatorInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + period?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.FloatFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type IndicatorPointUncheckedUpdateManyWithoutIndicatorInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + period?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.FloatFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + + +export type IndicatorPointSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + indicatorId?: boolean + period?: boolean + value?: boolean + createdAt?: boolean + updatedAt?: boolean + indicator?: boolean | Prisma.IndicatorDefaultArgs +}, ExtArgs["result"]["indicatorPoint"]> + + + +export type IndicatorPointSelectScalar = { + id?: boolean + indicatorId?: boolean + period?: boolean + value?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type IndicatorPointOmit = runtime.Types.Extensions.GetOmit<"id" | "indicatorId" | "period" | "value" | "createdAt" | "updatedAt", ExtArgs["result"]["indicatorPoint"]> +export type IndicatorPointInclude = { + indicator?: boolean | Prisma.IndicatorDefaultArgs +} + +export type $IndicatorPointPayload = { + name: "IndicatorPoint" + objects: { + indicator: Prisma.$IndicatorPayload + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + indicatorId: number + period: string + value: number + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["indicatorPoint"]> + composites: {} +} + +export type IndicatorPointGetPayload = runtime.Types.Result.GetResult + +export type IndicatorPointCountArgs = + Omit & { + select?: IndicatorPointCountAggregateInputType | true + } + +export interface IndicatorPointDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['IndicatorPoint'], meta: { name: 'IndicatorPoint' } } + /** + * Find zero or one IndicatorPoint that matches the filter. + * @param {IndicatorPointFindUniqueArgs} args - Arguments to find a IndicatorPoint + * @example + * // Get one IndicatorPoint + * const indicatorPoint = await prisma.indicatorPoint.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one IndicatorPoint that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {IndicatorPointFindUniqueOrThrowArgs} args - Arguments to find a IndicatorPoint + * @example + * // Get one IndicatorPoint + * const indicatorPoint = await prisma.indicatorPoint.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first IndicatorPoint that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {IndicatorPointFindFirstArgs} args - Arguments to find a IndicatorPoint + * @example + * // Get one IndicatorPoint + * const indicatorPoint = await prisma.indicatorPoint.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first IndicatorPoint that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {IndicatorPointFindFirstOrThrowArgs} args - Arguments to find a IndicatorPoint + * @example + * // Get one IndicatorPoint + * const indicatorPoint = await prisma.indicatorPoint.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more IndicatorPoints that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {IndicatorPointFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all IndicatorPoints + * const indicatorPoints = await prisma.indicatorPoint.findMany() + * + * // Get first 10 IndicatorPoints + * const indicatorPoints = await prisma.indicatorPoint.findMany({ take: 10 }) + * + * // Only select the `id` + * const indicatorPointWithIdOnly = await prisma.indicatorPoint.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a IndicatorPoint. + * @param {IndicatorPointCreateArgs} args - Arguments to create a IndicatorPoint. + * @example + * // Create one IndicatorPoint + * const IndicatorPoint = await prisma.indicatorPoint.create({ + * data: { + * // ... data to create a IndicatorPoint + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many IndicatorPoints. + * @param {IndicatorPointCreateManyArgs} args - Arguments to create many IndicatorPoints. + * @example + * // Create many IndicatorPoints + * const indicatorPoint = await prisma.indicatorPoint.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Delete a IndicatorPoint. + * @param {IndicatorPointDeleteArgs} args - Arguments to delete one IndicatorPoint. + * @example + * // Delete one IndicatorPoint + * const IndicatorPoint = await prisma.indicatorPoint.delete({ + * where: { + * // ... filter to delete one IndicatorPoint + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one IndicatorPoint. + * @param {IndicatorPointUpdateArgs} args - Arguments to update one IndicatorPoint. + * @example + * // Update one IndicatorPoint + * const indicatorPoint = await prisma.indicatorPoint.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more IndicatorPoints. + * @param {IndicatorPointDeleteManyArgs} args - Arguments to filter IndicatorPoints to delete. + * @example + * // Delete a few IndicatorPoints + * const { count } = await prisma.indicatorPoint.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more IndicatorPoints. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {IndicatorPointUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many IndicatorPoints + * const indicatorPoint = await prisma.indicatorPoint.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one IndicatorPoint. + * @param {IndicatorPointUpsertArgs} args - Arguments to update or create a IndicatorPoint. + * @example + * // Update or create a IndicatorPoint + * const indicatorPoint = await prisma.indicatorPoint.upsert({ + * create: { + * // ... data to create a IndicatorPoint + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the IndicatorPoint we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__IndicatorPointClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of IndicatorPoints. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {IndicatorPointCountArgs} args - Arguments to filter IndicatorPoints to count. + * @example + * // Count the number of IndicatorPoints + * const count = await prisma.indicatorPoint.count({ + * where: { + * // ... the filter for the IndicatorPoints we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a IndicatorPoint. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {IndicatorPointAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by IndicatorPoint. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {IndicatorPointGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends IndicatorPointGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: IndicatorPointGroupByArgs['orderBy'] } + : { orderBy?: IndicatorPointGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetIndicatorPointGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the IndicatorPoint model + */ +readonly fields: IndicatorPointFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for IndicatorPoint. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__IndicatorPointClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + indicator = {}>(args?: Prisma.Subset>): Prisma.Prisma__IndicatorClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the IndicatorPoint model + */ +export interface IndicatorPointFieldRefs { + readonly id: Prisma.FieldRef<"IndicatorPoint", 'Int'> + readonly indicatorId: Prisma.FieldRef<"IndicatorPoint", 'Int'> + readonly period: Prisma.FieldRef<"IndicatorPoint", 'String'> + readonly value: Prisma.FieldRef<"IndicatorPoint", 'Float'> + readonly createdAt: Prisma.FieldRef<"IndicatorPoint", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"IndicatorPoint", 'DateTime'> +} + + +// Custom InputTypes +/** + * IndicatorPoint findUnique + */ +export type IndicatorPointFindUniqueArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * Filter, which IndicatorPoint to fetch. + */ + where: Prisma.IndicatorPointWhereUniqueInput +} + +/** + * IndicatorPoint findUniqueOrThrow + */ +export type IndicatorPointFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * Filter, which IndicatorPoint to fetch. + */ + where: Prisma.IndicatorPointWhereUniqueInput +} + +/** + * IndicatorPoint findFirst + */ +export type IndicatorPointFindFirstArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * Filter, which IndicatorPoint to fetch. + */ + where?: Prisma.IndicatorPointWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of IndicatorPoints to fetch. + */ + orderBy?: Prisma.IndicatorPointOrderByWithRelationInput | Prisma.IndicatorPointOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for IndicatorPoints. + */ + cursor?: Prisma.IndicatorPointWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` IndicatorPoints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` IndicatorPoints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of IndicatorPoints. + */ + distinct?: Prisma.IndicatorPointScalarFieldEnum | Prisma.IndicatorPointScalarFieldEnum[] +} + +/** + * IndicatorPoint findFirstOrThrow + */ +export type IndicatorPointFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * Filter, which IndicatorPoint to fetch. + */ + where?: Prisma.IndicatorPointWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of IndicatorPoints to fetch. + */ + orderBy?: Prisma.IndicatorPointOrderByWithRelationInput | Prisma.IndicatorPointOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for IndicatorPoints. + */ + cursor?: Prisma.IndicatorPointWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` IndicatorPoints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` IndicatorPoints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of IndicatorPoints. + */ + distinct?: Prisma.IndicatorPointScalarFieldEnum | Prisma.IndicatorPointScalarFieldEnum[] +} + +/** + * IndicatorPoint findMany + */ +export type IndicatorPointFindManyArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * Filter, which IndicatorPoints to fetch. + */ + where?: Prisma.IndicatorPointWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of IndicatorPoints to fetch. + */ + orderBy?: Prisma.IndicatorPointOrderByWithRelationInput | Prisma.IndicatorPointOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing IndicatorPoints. + */ + cursor?: Prisma.IndicatorPointWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` IndicatorPoints from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` IndicatorPoints. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of IndicatorPoints. + */ + distinct?: Prisma.IndicatorPointScalarFieldEnum | Prisma.IndicatorPointScalarFieldEnum[] +} + +/** + * IndicatorPoint create + */ +export type IndicatorPointCreateArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * The data needed to create a IndicatorPoint. + */ + data: Prisma.XOR +} + +/** + * IndicatorPoint createMany + */ +export type IndicatorPointCreateManyArgs = { + /** + * The data used to create many IndicatorPoints. + */ + data: Prisma.IndicatorPointCreateManyInput | Prisma.IndicatorPointCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * IndicatorPoint update + */ +export type IndicatorPointUpdateArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * The data needed to update a IndicatorPoint. + */ + data: Prisma.XOR + /** + * Choose, which IndicatorPoint to update. + */ + where: Prisma.IndicatorPointWhereUniqueInput +} + +/** + * IndicatorPoint updateMany + */ +export type IndicatorPointUpdateManyArgs = { + /** + * The data used to update IndicatorPoints. + */ + data: Prisma.XOR + /** + * Filter which IndicatorPoints to update + */ + where?: Prisma.IndicatorPointWhereInput + /** + * Limit how many IndicatorPoints to update. + */ + limit?: number +} + +/** + * IndicatorPoint upsert + */ +export type IndicatorPointUpsertArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * The filter to search for the IndicatorPoint to update in case it exists. + */ + where: Prisma.IndicatorPointWhereUniqueInput + /** + * In case the IndicatorPoint found by the `where` argument doesn't exist, create a new IndicatorPoint with this data. + */ + create: Prisma.XOR + /** + * In case the IndicatorPoint was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * IndicatorPoint delete + */ +export type IndicatorPointDeleteArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null + /** + * Filter which IndicatorPoint to delete. + */ + where: Prisma.IndicatorPointWhereUniqueInput +} + +/** + * IndicatorPoint deleteMany + */ +export type IndicatorPointDeleteManyArgs = { + /** + * Filter which IndicatorPoints to delete + */ + where?: Prisma.IndicatorPointWhereInput + /** + * Limit how many IndicatorPoints to delete. + */ + limit?: number +} + +/** + * IndicatorPoint without action + */ +export type IndicatorPointDefaultArgs = { + /** + * Select specific fields to fetch from the IndicatorPoint + */ + select?: Prisma.IndicatorPointSelect | null + /** + * Omit specific fields from the IndicatorPoint + */ + omit?: Prisma.IndicatorPointOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.IndicatorPointInclude | null +} diff --git a/generated/prisma/models/Strategy.ts b/generated/prisma/models/Strategy.ts index 469128b..b08f5ab 100644 --- a/generated/prisma/models/Strategy.ts +++ b/generated/prisma/models/Strategy.ts @@ -234,15 +234,15 @@ export type StrategyOrderByWithRelationInput = { export type StrategyWhereUniqueInput = Prisma.AtLeast<{ id?: number - name?: string AND?: Prisma.StrategyWhereInput | Prisma.StrategyWhereInput[] OR?: Prisma.StrategyWhereInput[] NOT?: Prisma.StrategyWhereInput | Prisma.StrategyWhereInput[] + name?: Prisma.StringFilter<"Strategy"> | string description?: Prisma.StringFilter<"Strategy"> | string data?: Prisma.JsonFilter<"Strategy"> createdAt?: Prisma.DateTimeFilter<"Strategy"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Strategy"> | Date | string -}, "id" | "name"> +}, "id"> export type StrategyOrderByWithAggregationInput = { id?: Prisma.SortOrder diff --git a/prisma/migrations/20260806120000_indicator_points/migration.sql b/prisma/migrations/20260806120000_indicator_points/migration.sql new file mode 100644 index 0000000..b0f587f --- /dev/null +++ b/prisma/migrations/20260806120000_indicator_points/migration.sql @@ -0,0 +1,24 @@ +-- 经济指标: 明细数据拆到独立表, 兼容年/季/月/日频率 +-- 第一步: 建 IndicatorPoint 表 + Indicator 加元数据列 (data 列暂保留, 由迁移脚本搬运后删除) + +-- CreateTable +CREATE TABLE `IndicatorPoint` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `indicatorId` INTEGER NOT NULL, + `period` VARCHAR(191) NOT NULL, + `value` DOUBLE NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `updatedAt` DATETIME(3) NOT NULL, + + UNIQUE INDEX `IndicatorPoint_indicatorId_period_key`(`indicatorId`, `period`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- AlterTable: 元数据列 (data JSON 拆出) +ALTER TABLE `Indicator` ADD COLUMN `title` VARCHAR(191) NOT NULL DEFAULT '', +ADD COLUMN `unit` VARCHAR(191) NOT NULL DEFAULT '', +ADD COLUMN `source` VARCHAR(191) NOT NULL DEFAULT '', +ADD COLUMN `frequency` VARCHAR(191) NOT NULL DEFAULT 'month'; + +-- AddForeignKey +ALTER TABLE `IndicatorPoint` ADD CONSTRAINT `IndicatorPoint_indicatorId_fkey` FOREIGN KEY (`indicatorId`) REFERENCES `Indicator`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/migrations/20260806121000_drop_indicator_data_json/migration.sql b/prisma/migrations/20260806121000_drop_indicator_data_json/migration.sql new file mode 100644 index 0000000..07c9664 --- /dev/null +++ b/prisma/migrations/20260806121000_drop_indicator_data_json/migration.sql @@ -0,0 +1,3 @@ +-- 第二步: 明细数据已迁移到 IndicatorPoint, 删除 Indicator.data JSON 列 +-- AlterTable +ALTER TABLE `Indicator` DROP COLUMN `data`; diff --git a/prisma/migrations/20260806123000_add_indicator_hidden/migration.sql b/prisma/migrations/20260806123000_add_indicator_hidden/migration.sql new file mode 100644 index 0000000..f54a938 --- /dev/null +++ b/prisma/migrations/20260806123000_add_indicator_hidden/migration.sql @@ -0,0 +1,2 @@ +-- 指标隐藏标记: 数据与获取脚本保留, 前端展示过滤 hidden=true +ALTER TABLE `Indicator` ADD COLUMN `hidden` BOOLEAN NOT NULL DEFAULT false; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ca2bcfd..3514636 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -41,12 +41,29 @@ model Strategy { } model Indicator { - id Int @id @default(autoincrement()) - name String + id Int @id @default(autoincrement()) + name String @unique groupName String - data Json - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt + title String @default("") + unit String @default("") + source String @default("") + frequency String @default("month") // year | quarter | month | day + hidden Boolean @default(false) // true = 数据/脚本保留, 但不在前端展示 + points IndicatorPoint[] + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model IndicatorPoint { + id Int @id @default(autoincrement()) + indicatorId Int + indicator Indicator @relation(fields: [indicatorId], references: [id], onDelete: Cascade) + period String // "2024" | "2024-Q1" | "2024-01" | "2024-01-15" + value Float + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@unique([indicatorId, period]) } model Econ_SowInventory { @@ -66,3 +83,5 @@ model ScraperCache { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt } + + diff --git a/readme b/readme index 3c49af3..ca41fd5 100644 --- a/readme +++ b/readme @@ -6,18 +6,18 @@ - -## 新闻模块 -增加一个新闻模块,数据来源是每日夜间 3点,通过妙想 MCP 获取国内外最新经济政治新闻,按影响大小排序10条。 -存入数据库。 - - -## 报警模块 -World Bank 中的数据只用来对比妙想 MCP 拉取的数据正确性。当同一时间的同一项数据不同时,记录一个报警。 - - ## 首页 首页显示新闻模块和报警模块的数据,按照时间最新优先,无限滚动,直到数据库中没有数据为止。 +### 新闻模块 +增加一个新闻模块,数据来源是每日夜间 3点,通过妙想 MCP 获取国内外最新经济政治新闻,按影响大小排序10条。 +存入数据库。 + + +### 报警模块 +World Bank 中的数据只用来对比妙想 MCP 拉取的数据正确性。当同一时间的同一项数据不同时,记录一个报警。 + + + diff --git a/scripts/fetchers/eastmoney-mcp.fetcher.js b/scripts/fetchers/eastmoney-mcp.fetcher.js index 6ed104f..053dca8 100644 --- a/scripts/fetchers/eastmoney-mcp.fetcher.js +++ b/scripts/fetchers/eastmoney-mcp.fetcher.js @@ -50,6 +50,59 @@ const INDICATORS = [ sheets.find((s) => s.items?.[0]?.[0]?.includes('GDP') && s.items[0][0].includes('同比')) || sheets[0], }, + { + // 国债收益率: MCP 返回日频, 用月末降采样成月频点 + name: 'china-bond-10y', + groupName: 'china-macro', + title: '中国国债 10 年期收益率', + unit: '%', + frequency: 'month', + tool: 'mx_macro_data', + query: '查询中国10年期国债到期收益率 2024年至今 每日数据', + pickSheet: (sheets) => + sheets.find((s) => s.items?.some?.((row) => String(row[0] || '').includes('国债到期收益率:10年'))) + || sheets[0], + parseSheet: (sheet) => monthEndSample(sheet, '国债到期收益率:10年'), + }, + { + name: 'china-bond-1y', + groupName: 'china-macro', + title: '中国国债 1 年期收益率', + unit: '%', + frequency: 'month', + tool: 'mx_macro_data', + query: '查询中国1年期国债到期收益率 2024年至今 每日数据', + pickSheet: (sheets) => + sheets.find((s) => s.items?.some?.((row) => String(row[0] || '').includes('国债到期收益率:1年'))) + || sheets[0], + parseSheet: (sheet) => monthEndSample(sheet, '国债到期收益率:1年'), + }, + { + name: 'china-lpr-1y', + groupName: 'china-macro', + title: '中国 LPR 1 年期', + unit: '%', + frequency: 'month', + tool: 'mx_macro_data', + query: '查询中国LPR 1年期贷款市场报价利率 2024年至今 月度数据,每一个月的数值', + pickSheet: (sheets) => + sheets.find((s) => s.sheetName?.includes('宏观数据(月)')) + || sheets[0], + parseSheet: (sheet) => pickRowByKeyword(sheet, '(LPR):1年'), + }, + { + name: 'china-lpr-5y', + groupName: 'china-macro', + title: '中国 LPR 5 年期', + unit: '%', + frequency: 'month', + tool: 'mx_macro_data', + query: '查询中国LPR 5年期以上贷款市场报价利率 2024年至今 月度数据,每一个月的数值', + pickSheet: (sheets) => + sheets.find((s) => s.sheetName?.includes('宏观数据(月)')) + || sheets[0], + parseSheet: (sheet) => pickRowByKeyword(sheet, '(LPR):5年'), + }, ] export const META = { @@ -139,6 +192,44 @@ function defaultParseSheet(sheet) { return out.reverse() // 从老到新 } +// 宽表 → 长表, 指定 item 行 (按指标全名前缀匹配), 日频列降采样为月末值 +// 例: columns=["指标","来源","2026-08-05","2026-08-04",...] → [{period:"2024-01",value},...] +function monthEndSample(sheet, keyword) { + if (!sheet || !sheet.columns || !sheet.items) return [] + const row = sheet.items.find((r) => String(r[0] || '').includes(keyword)) + if (!row) return [] + const cols = sheet.columns + const dates = cols.slice(2) // 新 → 老 + const values = row.slice(2) + const out = [] + const seen = new Set() + for (let i = 0; i < dates.length; i++) { + const v = parseFloat(values[i]) + const m = String(dates[i] || '').slice(0, 7) // "2024-01-02" → "2024-01" + if (!/^\d{4}-\d{2}$/.test(m) || Number.isNaN(v)) continue + if (seen.has(m)) continue // 列是降序, 第一次遇到的即当月最后一个交易日 + seen.add(m) + out.push({ period: m, value: v }) + } + return out.reverse() // 从老到新 +} + +// 宽表 → 长表, 指定 item 行 (按指标全名前缀匹配), 保留原频率 (月/季/年) +function pickRowByKeyword(sheet, keyword) { + if (!sheet || !sheet.columns || !sheet.items) return [] + const row = sheet.items.find((r) => String(r[0] || '').includes(keyword)) + if (!row) return [] + const cols = sheet.columns + const dates = cols.slice(2) + const values = row.slice(2) + const out = [] + for (let i = 0; i < dates.length; i++) { + const v = parseFloat(values[i]) + if (!Number.isNaN(v)) out.push({ period: String(dates[i]), value: v }) + } + return out.reverse() // 从老到新 +} + // ====== fetcher 入口 ====== export async function listAvailableTools() { @@ -156,6 +247,7 @@ export async function fetchAll(opts = {}) { throw new Error('eastmoney-mcp: INDICATORS 数组为空, 加新指标见文件顶部注释') } const skip = opts.skipNames || new Set() + const force = opts.forceNames || new Set() const only = opts.onlyNames || null const key = process.env.EM_API_KEY @@ -165,7 +257,7 @@ export async function fetchAll(opts = {}) { const results = [] for (const cfg of INDICATORS) { - if (skip.has(cfg.name)) { + if (skip.has(cfg.name) && !force.has(cfg.name)) { console.log(`[MCP] ${cfg.name} 跳过 (DB 已存在)`) continue } @@ -199,7 +291,7 @@ export async function fetchAll(opts = {}) { } } // 全部被 DB 优先跳过时, 返回显式标记而不是空数组 (避免被误判为失败) - if (results.length === 0 && INDICATORS.every((cfg) => skip.has(cfg.name))) { + if (results.length === 0 && INDICATORS.every((cfg) => skip.has(cfg.name) && !force.has(cfg.name))) { return { skipped: true, reason: 'DB 已存在全部指标' } } return results @@ -208,3 +300,4 @@ export async function fetchAll(opts = {}) { + diff --git a/scripts/fetchers/index.js b/scripts/fetchers/index.js index 7e3a869..1de51c0 100644 --- a/scripts/fetchers/index.js +++ b/scripts/fetchers/index.js @@ -36,7 +36,8 @@ export function checkEnv(required) { // 加载并运行所有启用的 fetcher, 返回 [{ name, ok, items, error, skipped }] // 错误隔离: 一个 fetcher 挂了不影响其他 -// opts.skipNames: Set — DB 优先, 已存在的指标名, 透传给 fetcher +// opts.skipNames: Set — DB 优先, 已存在的指标名, 透传给 fetcher +// opts.forceNames: Set — 强制刷新名单, 即使 skipNames 里有也照拉 export async function runFetchers(opts = {}) { const results = [] for (const meta of FETCHERS) { @@ -57,7 +58,7 @@ export async function runFetchers(opts = {}) { throw new Error('fetcher 必须导出 META 和 fetchAll') } console.log(`[Fetcher] ${meta.name} 开始...`) - const out = await mod.fetchAll({ skipNames: opts.skipNames, onlyNames: opts.onlyNames }) + const out = await mod.fetchAll({ skipNames: opts.skipNames, onlyNames: opts.onlyNames, forceNames: opts.forceNames }) // fetcher 可返回 { skipped: true, reason } 表示"全部被 DB 优先跳过", 不算失败 if (out && out.skipped) { results.push({ name: meta.name, skipped: true, reason: out.reason }) diff --git a/scripts/migrate-indicator-points.cjs b/scripts/migrate-indicator-points.cjs new file mode 100644 index 0000000..fc3eb01 --- /dev/null +++ b/scripts/migrate-indicator-points.cjs @@ -0,0 +1,84 @@ +/** + * 一次性数据迁移: 把 Indicator.data (JSON) 拆分到 IndicatorPoint 明细表 + * 用法: 在迁移 A (建表+加列) 之后、迁移 B (删 data 列) 之前运行 + * 幂等: 同 (indicatorId, period) 重复插入会更新 value, 可安全重跑 + */ +require('dotenv').config() +const mysql = require('mysql2/promise') + +function parseUrl(url) { + const u = new URL(url) + return { + host: u.hostname, + port: Number(u.port) || 3306, + user: decodeURIComponent(u.username), + password: decodeURIComponent(u.password), + database: u.pathname.replace(/^\//, ''), + } +} + +// 根据 row 的时间字段推断频率: year | quarter | month | day +function inferFrequency(row) { + if (row && row.month !== undefined) return 'month' + if (row && row.year !== undefined) return 'year' + const p = String((row && row.period) || '') + if (/^\d{4}$/.test(p)) return 'year' + if (/^\d{4}-Q[1-4]$/.test(p)) return 'quarter' + if (/^\d{4}-\d{2}$/.test(p)) return 'month' + if (/^\d{4}-\d{2}-\d{2}$/.test(p)) return 'day' + return 'month' +} + +// 统一 row 的时间字段为 period +function periodOf(row) { + if (!row) return '' + return String(row.period !== undefined ? row.period : (row.month !== undefined ? row.month : row.year)) +} + +async function main() { + const conn = await mysql.createConnection(parseUrl(process.env.DATABASE_URL)) + try { + const [rows] = await conn.execute('SELECT id, name, groupName, data FROM Indicator') + console.log('[Migrate] 读取', rows.length, '个 Indicator') + + let points = 0, updated = 0 + for (const ind of rows) { + // mysql2 对 JSON 列已自动解析为对象, 兼容字符串兜底 + let data = ind.data + if (typeof data === 'string') { + try { data = JSON.parse(data) } catch { data = null } + } + const title = (data && data.title) || ind.name + const unit = (data && data.unit) || '' + const source = (data && data.source) || '' + const rowsArr = (data && Array.isArray(data.rows)) ? data.rows : [] + const freq = rowsArr.length ? inferFrequency(rowsArr[0]) : 'month' + + // 更新 Indicator 元数据列 + await conn.execute( + 'UPDATE Indicator SET title=?, unit=?, source=?, frequency=?, updatedAt=NOW(3) WHERE id=?', + [title, unit, source, freq, ind.id], + ) + updated++ + + // 写入明细 + for (const r of rowsArr) { + const period = periodOf(r) + const value = Number(r.value) + if (!period || Number.isNaN(value)) continue + const [res] = await conn.execute( + 'INSERT INTO IndicatorPoint (indicatorId, period, value, createdAt, updatedAt) VALUES (?, ?, ?, NOW(3), NOW(3)) ' + + 'ON DUPLICATE KEY UPDATE value=VALUES(value), updatedAt=NOW(3)', + [ind.id, period, value], + ) + points += (res.affectedRows > 0 ? 1 : 0) + } + console.log('[Migrate]', ind.name, '->', rowsArr.length, '个点, 频率', freq) + } + console.log('[Migrate] 完成: 更新', updated, '个 Indicator, 写入/更新', points, '个明细点') + } finally { + await conn.end() + } +} + +main().catch((e) => { console.error('[Migrate] 失败:', e); process.exit(1) }) diff --git a/scripts/refresh-indicators.cjs b/scripts/refresh-indicators.cjs index cdc14e6..297663d 100644 --- a/scripts/refresh-indicators.cjs +++ b/scripts/refresh-indicators.cjs @@ -1,7 +1,12 @@ /** - * 拉所有启用的数据源, upsert 到 Indicator 表 - * 用法: npm run data:refresh - * 幂等: 同 name 覆盖 data, 跨源独立, 错误隔离 + * 拉所有启用的数据源, upsert 到 Indicator + IndicatorPoint 明细表 + * 用法: + * npm run data:refresh # 只拉 DB 里没有的指标 + * npm run data:refresh -- --force a,b,c # 强制刷新指定指标 (忽略 DB 已有) + * + * 数据结构 (2026-08 重构): + * Indicator 元数据: name/groupName/title/unit/source/frequency/hidden + * IndicatorPoint 明细: (indicatorId, period, value), period 兼容年/季/月/日 * * DB 优先策略: * 1. 先从 DB 查已存在的 name 集合 @@ -14,6 +19,15 @@ require('dotenv').config() const mysql = require('mysql2/promise') +// 隐藏指标: 数据与获取脚本保留, 但不参与前端展示 (API 过滤) +const HIDDEN_INDICATORS = new Set([ + 'china-gdp-usd', // 中国 GDP (现价美元) + 'china-gdp-growth', // 中国 GDP 同比 (World Bank) + 'china-gdp-yoy', // 中国 GDP 同比 (妙想季度) + 'china-unemploy', // 中国失业率 + 'usa-gdp-usd', // 美国 GDP +]) + function parseUrl(url) { const u = new URL(url) return { @@ -25,13 +39,63 @@ function parseUrl(url) { } } -async function upsertIndicator(conn, payload) { - const sql = - 'INSERT INTO `Indicator` (`name`, `groupName`, `data`, `createdAt`, `updatedAt`) ' + - 'VALUES (?, ?, ?, NOW(3), NOW(3)) ' + - 'ON DUPLICATE KEY UPDATE `groupName` = VALUES(`groupName`), `data` = VALUES(`data`), `updatedAt` = NOW(3)' - const [r] = await conn.execute(sql, [payload.name, payload.groupName, JSON.stringify(payload.data)]) - return r.affectedRows +function parseForceArg(argv) { + const i = argv.indexOf('--force') + if (i === -1) return new Set() + return new Set(String(argv[i + 1] || '').split(',').map((s) => s.trim()).filter(Boolean)) +} + +// 推断频率: year | quarter | month | day (优先用 fetcher 显式声明) +function inferFrequency(data) { + if (data && data.frequency) return data.frequency + const p = String(((data && data.rows) || [])[0]?.period || '') + if (/^\d{4}$/.test(p)) return 'year' + if (/^\d{4}-Q[1-4]$/.test(p)) return 'quarter' + if (/^\d{4}-\d{2}$/.test(p)) return 'month' + if (/^\d{4}-\d{2}-\d{2}$/.test(p)) return 'day' + return 'month' +} + +// 写 Indicator 元数据 + 全量替换明细点 (每指标一个事务) +async function upsertIndicatorWithPoints(conn, payload) { + const { name, groupName, data, hidden } = payload + const title = data.title || name + const unit = data.unit || '' + const source = data.source || '' + const frequency = inferFrequency(data) + const rows = Array.isArray(data.rows) ? data.rows : [] + + await conn.beginTransaction() + try { + const [res] = await conn.execute( + 'INSERT INTO `Indicator` (`name`, `groupName`, `title`, `unit`, `source`, `frequency`, `hidden`, `createdAt`, `updatedAt`) ' + + 'VALUES (?, ?, ?, ?, ?, ?, ?, NOW(3), NOW(3)) ' + + 'ON DUPLICATE KEY UPDATE `groupName` = VALUES(`groupName`), `title` = VALUES(`title`), ' + + '`unit` = VALUES(`unit`), `source` = VALUES(`source`), `frequency` = VALUES(`frequency`), ' + + '`hidden` = VALUES(`hidden`), `updatedAt` = NOW(3)', + [name, groupName, title, unit, source, frequency, hidden ? 1 : 0], + ) + const indicatorId = res.insertId + + // 明细: 先删旧点再插入新点 (全量替换, 保证与数据源一致) + await conn.execute('DELETE FROM `IndicatorPoint` WHERE `indicatorId` = ?', [indicatorId]) + let points = 0 + for (const r of rows) { + const period = String(r.period !== undefined ? r.period : (r.month !== undefined ? r.month : r.year)) + const value = Number(r.value) + if (!period || Number.isNaN(value)) continue + await conn.execute( + 'INSERT INTO `IndicatorPoint` (`indicatorId`, `period`, `value`, `createdAt`, `updatedAt`) VALUES (?, ?, ?, NOW(3), NOW(3))', + [indicatorId, period, value], + ) + points++ + } + await conn.commit() + return { indicatorId, points } + } catch (e) { + await conn.rollback() + throw e + } } async function fetchExistingNames(conn) { @@ -44,48 +108,63 @@ async function main() { console.error('缺少 DATABASE_URL 环境变量') process.exit(1) } + const force = parseForceArg(process.argv.slice(2)) + if (force.size) console.log('[Refresh] 强制刷新: ' + [...force].join(', ')) + const conn = await mysql.createConnection(parseUrl(process.env.DATABASE_URL)) try { // 1) 查 DB 已存在的指标名 const existing = await fetchExistingNames(conn) - console.log(`[Refresh] DB 已有 ${existing.size} 个指标: ${[...existing].join(', ') || '(空)'}`) + console.log('[Refresh] DB 已有 ' + existing.size + ' 个指标: ' + ([...existing].join(', ') || '(空)')) - // 2) 跑所有 fetcher, 传入 existing (DB 优先) + // 2) 跑所有 fetcher, 传入 existing + force (DB 优先, force 覆盖) const { runFetchers } = await import('./fetchers/index.js') - const fetcherResults = await runFetchers({ skipNames: existing }) + const fetcherResults = await runFetchers({ skipNames: existing, forceNames: force }) - // 3) 汇总 + // 3) 汇总: force 名单里的指标即使 DB 已有也写入 const allItems = [] let skipped = 0, failed = 0 for (const r of fetcherResults) { if (r.skipped) { skipped++; continue } if (!r.ok) { failed++; continue } - // fetcher 内部已经按 skipNames 过滤过, 这里再做一次防御性去重 for (const it of r.items) { - if (existing.has(it.name)) continue + if (existing.has(it.name) && !force.has(it.name)) continue allItems.push(it) } } - console.log(`\n[Refresh] 汇总: ${allItems.length} 个新指标 (跳过 ${skipped} 个数据源, 失败 ${failed} 个, DB 已存在 ${existing.size} 个)`) + console.log('\n[Refresh] 汇总: ' + allItems.length + ' 个指标待写 (跳过 ' + skipped + ' 个数据源, 失败 ' + failed + ' 个, DB 已存在 ' + existing.size + ' 个)') if (failed > 0) { console.error('[Refresh] 警告: 有数据源失败, 仅写入成功的指标') } + // 5) 同步隐藏标记: 即使指标被 DB 优先跳过, 名单内的也确保 hidden=true + if (HIDDEN_INDICATORS.size > 0) { + const names = [...HIDDEN_INDICATORS] + const ph = names.map(() => '?').join(',') + const sql = "UPDATE `Indicator` SET `hidden` = 1, `updatedAt` = NOW(3) WHERE `name` IN (" + ph + ")" + await conn.execute(sql, names) + console.log('[Refresh] 同步隐藏标记: ' + names.length + ' 个指标 hidden=true (数据保留, 不展示)') + } + if (allItems.length === 0) { - console.log('[Refresh] 无新指标, 不写库 (DB 优先策略生效)') + console.log('[Refresh] 无指标待写, 不写库 (DB 优先策略生效)') return } // 4) 写库 console.log('[Refresh] 写入数据库...') - let ins = 0, upd = 0 + let ins = 0, upd = 0, totalPoints = 0 for (const it of allItems) { - const n = await upsertIndicator(conn, { name: it.name, groupName: it.groupName, data: it.data }) - if (n === 1) ins++ - else if (n === 2) upd++ + const hidden = HIDDEN_INDICATORS.has(it.name) + const { points } = await upsertIndicatorWithPoints(conn, { name: it.name, groupName: it.groupName, data: it.data, hidden }) + if (points > 0) ins++ + else upd++ + totalPoints += points + console.log('[Refresh] ' + it.name + (hidden ? ' (hidden)' : '') + ': ' + points + ' 个明细点') } - console.log(`[Refresh] 写入完成: ${ins} 新增, ${upd} 更新\n`) + console.log('[Refresh] 写入完成: ' + ins + ' 个指标有数据, ' + upd + ' 个无数据, 共 ' + totalPoints + ' 个明细点\n') + } finally { await conn.end() } @@ -95,3 +174,4 @@ main().catch((e) => { console.error('[Refresh] 异常:', e) process.exit(1) }) + diff --git a/scripts/seed.cjs b/scripts/seed.cjs index 9b831ed..21317ae 100644 --- a/scripts/seed.cjs +++ b/scripts/seed.cjs @@ -92,16 +92,8 @@ async function main() { } console.log('[Strategy] upsert 策略: ' + n2 + ' 行 (1=新增, 2=更新)'); - // Indicator 表: 改由 scripts/refresh-indicators.cjs 从 World Bank API 拉取最新数据 - // 旧 4 个金融指标 (国债/LPR) 无稳定 JSON 数据源, 暂不维护 - const indicators = []; - let n3 = 0; - for (const i of indicators) { - n3 += await upsertByName(conn, 'Indicator', - { name: i.name, groupName: i.groupName, data: JSON.stringify(i.data), updatedAt: new Date() }, - 'name'); - } - console.log('[Indicator] upsert 指标: ' + n3 + ' 行 (1=新增, 2=更新)'); + // Indicator 表: 改由 scripts/refresh-indicators.cjs 管理 (2026-08 重构后数据存 IndicatorPoint 明细表) + // 本脚本不再写入 Indicator, 如需初始化指标请运行 npm run data:refresh const article = { title: '欢迎使用 iBoard', diff --git a/server/routes/data.js b/server/routes/data.js index 48fe8e8..0015fa2 100644 --- a/server/routes/data.js +++ b/server/routes/data.js @@ -6,10 +6,26 @@ const router = Router() router.use(authRequired) +// 指标列表: 元数据 + 明细点, 过滤 hidden (数据与脚本保留, 仅不展示) router.get('/indicators', async (_req, res, next) => { try { - const rows = await prisma.indicator.findMany({ orderBy: [{ groupName: 'asc' }, { name: 'asc' }] }) - res.json({ indicators: rows }) + const rows = await prisma.indicator.findMany({ + where: { hidden: false }, + include: { points: { orderBy: { period: 'asc' } } }, + orderBy: [{ groupName: 'asc' }, { name: 'asc' }], + }) + // 组装前端友好结构: points 保持从老到新 + const indicators = rows.map((r) => ({ + id: r.id, + name: r.name, + groupName: r.groupName, + title: r.title, + unit: r.unit, + source: r.source, + frequency: r.frequency, + points: r.points.map((p) => ({ period: p.period, value: p.value })), + })) + res.json({ indicators }) } catch (e) { next(e) } }) diff --git a/src/pages/MacroPage.jsx b/src/pages/MacroPage.jsx index cc25f26..23e327a 100644 --- a/src/pages/MacroPage.jsx +++ b/src/pages/MacroPage.jsx @@ -45,10 +45,13 @@ export default function MacroPage() { if (next) navigate(next.path) } - // 详情页 /macro/articles/:slug 单独走 React Router 渲染, 不参与滑屏 - if (location.pathname.match(/^\/macro\/articles\/[^/]+$/)) { + // 详情页 /macro/articles/:slug 和 /macro/data/:name 单独走 React Router 渲染, 不参与滑屏 + // 这样浏览器/手机物理返回键也能正常回到列表 + if (location.pathname.match(/^\/macro\/(articles|data|strategy)\/[^/]+$/)) { return ( + } /> + } /> } /> ) diff --git a/src/pages/macro/DataView.jsx b/src/pages/macro/DataView.jsx index d6236c1..cb17ed6 100644 --- a/src/pages/macro/DataView.jsx +++ b/src/pages/macro/DataView.jsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react' +import { useParams, useNavigate } from 'react-router-dom' import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts' import { Card, List, NavBar } from 'antd-mobile' import { api } from '../../api/client.js' @@ -7,6 +8,9 @@ import TrendBadge, { calcTrend, lastPoint } from '../../components/TrendBadge.js // 经济数据 // 列表态 (默认): 列出所有指标, 每行显示最新值 + 趋势徽标, 点击进入详情 // 详情态: 顶部 NavBar (返回) + 折线图 + 数据表 +// 频率中文标签 (对应 Indicator.frequency) +const FREQ_LABEL = { year: '年', quarter: '季', month: '月', day: '日' } + // 统一数据行的时间字段: 兼容 {month}/{year}/{period} 三种存储形状 function periodOf(r) { return (r && (r.period || r.month || r.year)) || '' @@ -16,7 +20,9 @@ export default function DataView() { const [indicators, setIndicators] = useState([]) const [err, setErr] = useState('') const [loading, setLoading] = useState(true) - const [selected, setSelected] = useState(null) // null = 列表态, 名称 = 详情态 + // 路由驱动: /macro/data 列表, /macro/data/:name 详情, 浏览器/手机返回键天然可用 + const { name } = useParams() + const navigate = useNavigate() useEffect(() => { let cancelled = false @@ -35,41 +41,33 @@ export default function DataView() { if (err) return
{err}
if (!indicators.length) return
暂无指标数据, 请先执行 npm run db:seed
- // 详情态 - if (selected) { - const cur = indicators.find((i) => i.name === selected) - if (cur) return setSelected(null)} /> + // 详情态 (路径 /macro/data/:name) + if (name) { + const cur = indicators.find((i) => i.name === name) + if (cur) return navigate('/macro/data')} /> } // 列表态 - const labelOf = (i) => (i.data && i.data.title) || i.name + const labelOf = (i) => i.title || i.name return (
经济数据
{indicators.map((i) => { - const lp = lastPoint(i.data) - const { trend, change } = calcTrend(i.data && i.data.rows) - const unit = (i.data && i.data.unit) || '' + const lp = lastPoint({ rows: i.points || [] }) + const { trend, change } = calcTrend(i.points || []) + const unit = i.unit || '' return ( {lp.value}{unit} · {periodOf(lp)} : '暂无数据'} - extra={ -
- {lp && Math.abs(change) >= 1 && ( - - {change > 0 ? '+' : ''}{change.toFixed(1)}% - - )} - -
- } + extra={} + arrowIcon clickable - onClick={() => setSelected(i.name)} + onClick={() => navigate('/macro/data/' + i.name)} /> ) })} @@ -81,19 +79,19 @@ export default function DataView() { // 详情: 折线图 + 数据表 function DataDetail({ indicator, onBack }) { const i = indicator - const rows = (i.data && i.data.rows) || [] + const rows = (i.points || []) // 图表 X 轴统一用 period 字段 const chartRows = rows.map((r) => ({ ...r, period: periodOf(r) })) - const lp = lastPoint(i.data) + const lp = lastPoint({ rows }) const { trend } = calcTrend(rows) - const title = (i.data && i.data.title) || i.name + const title = i.title || i.name return (
{title}
- 单位 {i.data.unit || '-'} · 来源 {i.data.source || 'seed'} · - {lp && <> 最新 {lp.value}{i.data.unit || ''} ({periodOf(lp)}) } + 单位 {i.unit || '-'} · 频率 {FREQ_LABEL[i.frequency] || i.frequency || '-'} · 来源 {i.source || 'seed'} · + {lp && <> 最新 {lp.value}{i.unit || ''} ({periodOf(lp)}) }
@@ -104,7 +102,7 @@ function DataDetail({ indicator, onBack }) { - +
diff --git a/src/pages/macro/StrategyView.jsx b/src/pages/macro/StrategyView.jsx index 91ca552..e93a782 100644 --- a/src/pages/macro/StrategyView.jsx +++ b/src/pages/macro/StrategyView.jsx @@ -1,4 +1,5 @@ import { useEffect, useState } from 'react' +import { useParams, useNavigate } from 'react-router-dom' import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts' import { Card, List, NavBar } from 'antd-mobile' import { api } from '../../api/client.js' @@ -26,7 +27,9 @@ export default function StrategyView() { const [strategies, setStrategies] = useState([]) const [err, setErr] = useState('') const [loading, setLoading] = useState(true) - const [selected, setSelected] = useState(null) + // 路由驱动: /macro/strategy 列表, /macro/strategy/:name 详情, 浏览器/手机返回键天然可用 + const { name } = useParams() + const navigate = useNavigate() useEffect(() => { let cancelled = false @@ -42,10 +45,10 @@ export default function StrategyView() { if (err) return
{err}
if (!strategies.length) return
暂无策略数据
- // 详情态 - if (selected) { - const cur = strategies.find((s) => s.name === selected) - if (cur) return setSelected(null)} /> + // 详情态 (路径 /macro/strategy/:name) + if (name) { + const cur = strategies.find((s) => s.name === name) + if (cur) return navigate('/macro/strategy')} /> } // 列表态: 主指标 = 债务/GDP, 趋势基于其最近变化 @@ -64,19 +67,10 @@ export default function StrategyView() { description={last ? <>{last.debtToGdp}% · 债务利息/GDP {last.interestToGdp}% · {last.year} : '暂无数据'} - extra={ -
- {last && Math.abs(change) >= 1 && ( - - {change > 0 ? '+' : ''}{change.toFixed(1)}% - - )} - -
- } + extra={} arrowIcon clickable - onClick={() => setSelected(s.name)} + onClick={() => navigate('/macro/strategy/' + s.name)} /> ) })}