mirror of https://github.com/ghostfolio/ghostfolio
96 changed files with 4782 additions and 2634 deletions
@ -0,0 +1,12 @@ |
|||
import { TAG_ID_EXCLUDE_FROM_ANALYSIS } from '@ghostfolio/common/config'; |
|||
|
|||
import { Prisma } from '@prisma/client'; |
|||
|
|||
export const WHERE_ACCOUNT_NOT_EXCLUDED: Prisma.AccountWhereInput = { |
|||
isExcluded: false, |
|||
tags: { |
|||
none: { |
|||
tagId: TAG_ID_EXCLUDE_FROM_ANALYSIS |
|||
} |
|||
} |
|||
}; |
|||
@ -1,7 +1,11 @@ |
|||
import { Account } from '@prisma/client'; |
|||
import { User } from '@ghostfolio/common/interfaces'; |
|||
|
|||
import { Account, Tag } from '@prisma/client'; |
|||
|
|||
export interface CreateOrUpdateAccountDialogParams { |
|||
account: Omit<Account, 'createdAt' | 'id' | 'updatedAt' | 'userId'> & { |
|||
id: string | null; |
|||
tags?: Tag[]; |
|||
}; |
|||
user: User; |
|||
} |
|||
|
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,3 +1,6 @@ |
|||
import { Account, Platform } from '@prisma/client'; |
|||
import { Account, Platform, Tag } from '@prisma/client'; |
|||
|
|||
export type AccountWithPlatform = Account & { platform?: Platform }; |
|||
export type AccountWithPlatform = Account & { |
|||
platform?: Platform; |
|||
tags?: Tag[]; |
|||
}; |
|||
|
|||
@ -0,0 +1,12 @@ |
|||
export type ProductCategory = |
|||
| 'BUDGETING' |
|||
| 'CRYPTOCURRENCY' |
|||
| 'DIVIDEND_TRACKING' |
|||
| 'ETF_TRACKING' |
|||
| 'FAMILY_OFFICE' |
|||
| 'FINANCIAL_PLANNING' |
|||
| 'INVESTMENT_RESEARCH' |
|||
| 'NET_WORTH_TRACKING' |
|||
| 'STOCK_TRACKING' |
|||
| 'TAX_REPORTING' |
|||
| 'WEALTH_MANAGEMENT'; |
|||
@ -0,0 +1,7 @@ |
|||
export type ProductPlatform = |
|||
| 'ANDROID' |
|||
| 'IOS' |
|||
| 'LINUX' |
|||
| 'MACOS' |
|||
| 'WEB' |
|||
| 'WINDOWS'; |
|||
@ -0,0 +1,7 @@ |
|||
import type * as config from '../config'; |
|||
|
|||
export type PropertyKey = { |
|||
[Key in keyof typeof config]: Key extends `PROPERTY_${string}` |
|||
? (typeof config)[Key] |
|||
: never; |
|||
}[keyof typeof config]; |
|||
@ -0,0 +1,20 @@ |
|||
-- CreateTable |
|||
CREATE TABLE "TagsOnAccounts" ( |
|||
"accountId" TEXT NOT NULL, |
|||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|||
"tagId" TEXT NOT NULL, |
|||
"updatedAt" TIMESTAMP(3) NOT NULL, |
|||
"userId" TEXT NOT NULL, |
|||
|
|||
CONSTRAINT "TagsOnAccounts_pkey" PRIMARY KEY ("accountId","tagId","userId") |
|||
); |
|||
|
|||
-- CreateIndex |
|||
CREATE INDEX "TagsOnAccounts_tagId_idx" ON "TagsOnAccounts"("tagId"); |
|||
|
|||
-- AddForeignKey |
|||
ALTER TABLE "TagsOnAccounts" ADD CONSTRAINT "TagsOnAccounts_accountId_userId_fkey" FOREIGN KEY ("accountId", "userId") REFERENCES "Account"("id", "userId") ON DELETE CASCADE ON UPDATE CASCADE; |
|||
|
|||
-- AddForeignKey |
|||
ALTER TABLE "TagsOnAccounts" ADD CONSTRAINT "TagsOnAccounts_tagId_fkey" FOREIGN KEY ("tagId") REFERENCES "Tag"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
|||
|
|||
Loading…
Reference in new issue