数据源修改
This commit is contained in:
+24
-5
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user