feat: add account groups, scheduled payments and cash flow calendar
This commit is contained in:
1 parent
a7e0a0fe58
commit
86c6daf695
46 files changed
+2548
-290
No files matched your search
@@ -30,6 +30,7 @@ model User {
|
||||
sessions Session[]
|
||||
icons Icon[]
|
||||
transfers Transfer[]
|
||||
schedules Schedule[]
|
||||
}
|
||||
/// 登录会话与隐藏项目查看授权
|
||||
model Session {
|
||||
@@ -67,6 +68,8 @@ model Position {
|
||||
name String @db.VarChar(100)
|
||||
/// 项目分类代码
|
||||
category String @db.VarChar(40)
|
||||
/// 自定义账户分组;空字符串表示未分组
|
||||
groupName String @default("") @db.VarChar(60)
|
||||
/// 原始币种代码
|
||||
currency String @db.Char(3)
|
||||
/// 用户备注,原文保留
|
||||
@@ -210,3 +213,24 @@ model Transfer {
|
||||
@@unique([userId,importedFromId])
|
||||
@@index([userId,effectiveDate,id])
|
||||
}
|
||||
|
||||
/// 按需执行的定时支出或转账计划
|
||||
model Schedule {
|
||||
id String @id @default(uuid()) @db.Char(36)
|
||||
userId String @db.Char(36)
|
||||
user User @relation(fields:[userId],references:[id],onDelete:Cascade)
|
||||
importedFromId String? @db.Char(36)
|
||||
name String @db.VarChar(100)
|
||||
operation String @db.VarChar(16)
|
||||
sourceId String @db.Char(36)
|
||||
targetId String? @db.Char(36)
|
||||
amount Decimal @db.Decimal(24,8)
|
||||
received Decimal @db.Decimal(24,8)
|
||||
nextAt DateTime @db.DateTime(3)
|
||||
intervalDays Int
|
||||
enabled Boolean @default(true)
|
||||
completed Boolean @default(false)
|
||||
notes String @db.Text
|
||||
@@index([userId,enabled,nextAt])
|
||||
@@unique([userId,importedFromId])
|
||||
}
|
||||
Reference in new issue
Block a user