feat(ledger): 引入 latestPrice 字段与历史成本追踪,实装 P&L 盈亏计算引擎
This commit is contained in:
@@ -20,6 +20,7 @@ export const assets = pgTable("assets", {
|
||||
symbol: varchar("symbol", { length: 20 }).notNull().unique(),
|
||||
type: assetTypeEnum("type").notNull(),
|
||||
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" })
|
||||
.defaultNow(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user