Feature/rename Order to activities in User database schema (#4669)

* Rename Order to activities in User database schema

* Update changelog
This commit is contained in:
Thomas Kaul 2025-05-09 16:19:14 +02:00 committed by GitHub
parent 72ccf47526
commit 037d3b1a60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 6 deletions

View File

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Renamed `Order` to `activities` in the `User` database schema
- Improved the language localization for Catalan (`ca`) - Improved the language localization for Catalan (`ca`)
- Improved the language localization for Italian (`it`) - Improved the language localization for Italian (`it`)
- Upgraded `nestjs` from version `10.4.15` to `11.0.12` - Upgraded `nestjs` from version `10.4.15` to `11.0.12`

View File

@ -821,7 +821,7 @@ export class AdminService {
where, where,
select: { select: {
_count: { _count: {
select: { Account: true, Order: true } select: { Account: true, activities: true }
}, },
Analytics: { Analytics: {
select: { select: {
@ -869,10 +869,10 @@ export class AdminService {
role, role,
subscription, subscription,
accountCount: _count.Account || 0, accountCount: _count.Account || 0,
activityCount: _count.activities || 0,
country: Analytics?.country, country: Analytics?.country,
dailyApiRequests: Analytics?.dataProviderGhostfolioDailyRequests || 0, dailyApiRequests: Analytics?.dataProviderGhostfolioDailyRequests || 0,
lastActivity: Analytics?.updatedAt, lastActivity: Analytics?.updatedAt
transactionCount: _count.Order || 0
}; };
} }
); );

View File

@ -142,7 +142,7 @@
<gf-value <gf-value
class="d-inline-block justify-content-end" class="d-inline-block justify-content-end"
[locale]="user?.settings?.locale" [locale]="user?.settings?.locale"
[value]="element.transactionCount" [value]="element.activityCount"
/> />
</td> </td>
</ng-container> </ng-container>

View File

@ -4,6 +4,7 @@ export interface AdminUsers {
count: number; count: number;
users: { users: {
accountCount: number; accountCount: number;
activityCount: number;
country: string; country: string;
createdAt: Date; createdAt: Date;
dailyApiRequests: number; dailyApiRequests: number;
@ -11,6 +12,5 @@ export interface AdminUsers {
id: string; id: string;
lastActivity: Date; lastActivity: Date;
role: Role; role: Role;
transactionCount: number;
}[]; }[];
} }

View File

@ -245,6 +245,7 @@ model Tag {
model User { model User {
accessToken String? accessToken String?
activities Order[]
authChallenge String? authChallenge String?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
id String @id @default(uuid()) id String @id @default(uuid())
@ -260,7 +261,6 @@ model User {
Analytics Analytics? Analytics Analytics?
ApiKey ApiKey[] ApiKey ApiKey[]
AuthDevice AuthDevice[] AuthDevice AuthDevice[]
Order Order[]
Settings Settings? Settings Settings?
SymbolProfile SymbolProfile[] SymbolProfile SymbolProfile[]
Tag Tag[] Tag Tag[]