数据源修改

This commit is contained in:
cheney
2026-08-06 15:24:55 +08:00
parent b10b1c44db
commit ec15f40323
24 changed files with 2289 additions and 131 deletions
+24 -5
View File
@@ -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
}