feat(api): 重构资产录入新增 exchange 字段,并接入腾讯财经 qt.gtimg 极速行情引擎

This commit is contained in:
2026-04-28 11:39:30 +08:00
parent ce529928cc
commit 842a5fef8c
4 changed files with 59 additions and 27 deletions
+1
View File
@@ -19,6 +19,7 @@ export const assets = pgTable("assets", {
id: uuid("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
symbol: varchar("symbol", { length: 20 }).notNull().unique(),
type: assetTypeEnum("type").notNull(),
exchange: varchar("exchange", { length: 10 }).default('US'),
baseCurrency: varchar("base_currency", { length: 10 }).notNull(),
latestPrice: numeric("latest_price", { precision: 36, scale: 18 }).default('0').notNull(),
createdAt: timestamp("created_at", { withTimezone: true, mode: "date" })