Browse Source
Feature/rename Order to activities in User database schema (#4669)
* Rename Order to activities in User database schema
* Update changelog
pull/4689/head
Thomas Kaul
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with
7 additions and
6 deletions
-
CHANGELOG.md
-
apps/api/src/app/admin/admin.service.ts
-
apps/client/src/app/components/admin-users/admin-users.html
-
libs/common/src/lib/interfaces/admin-users.interface.ts
-
prisma/schema.prisma
|
|
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Renamed `Order` to `activities` in the `User` database schema |
|
|
|
- Improved the language localization for Catalan (`ca`) |
|
|
|
- Improved the language localization for Italian (`it`) |
|
|
|
- Upgraded `nestjs` from version `10.4.15` to `11.0.12` |
|
|
|
|
|
@ -821,7 +821,7 @@ export class AdminService { |
|
|
|
where, |
|
|
|
select: { |
|
|
|
_count: { |
|
|
|
select: { Account: true, Order: true } |
|
|
|
select: { Account: true, activities: true } |
|
|
|
}, |
|
|
|
Analytics: { |
|
|
|
select: { |
|
|
@ -869,10 +869,10 @@ export class AdminService { |
|
|
|
role, |
|
|
|
subscription, |
|
|
|
accountCount: _count.Account || 0, |
|
|
|
activityCount: _count.activities || 0, |
|
|
|
country: Analytics?.country, |
|
|
|
dailyApiRequests: Analytics?.dataProviderGhostfolioDailyRequests || 0, |
|
|
|
lastActivity: Analytics?.updatedAt, |
|
|
|
transactionCount: _count.Order || 0 |
|
|
|
lastActivity: Analytics?.updatedAt |
|
|
|
}; |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
@ -142,7 +142,7 @@ |
|
|
|
<gf-value |
|
|
|
class="d-inline-block justify-content-end" |
|
|
|
[locale]="user?.settings?.locale" |
|
|
|
[value]="element.transactionCount" |
|
|
|
[value]="element.activityCount" |
|
|
|
/> |
|
|
|
</td> |
|
|
|
</ng-container> |
|
|
|
|
|
@ -4,6 +4,7 @@ export interface AdminUsers { |
|
|
|
count: number; |
|
|
|
users: { |
|
|
|
accountCount: number; |
|
|
|
activityCount: number; |
|
|
|
country: string; |
|
|
|
createdAt: Date; |
|
|
|
dailyApiRequests: number; |
|
|
@ -11,6 +12,5 @@ export interface AdminUsers { |
|
|
|
id: string; |
|
|
|
lastActivity: Date; |
|
|
|
role: Role; |
|
|
|
transactionCount: number; |
|
|
|
}[]; |
|
|
|
} |
|
|
|
|
|
@ -245,6 +245,7 @@ model Tag { |
|
|
|
|
|
|
|
model User { |
|
|
|
accessToken String? |
|
|
|
activities Order[] |
|
|
|
authChallenge String? |
|
|
|
createdAt DateTime @default(now()) |
|
|
|
id String @id @default(uuid()) |
|
|
@ -260,7 +261,6 @@ model User { |
|
|
|
Analytics Analytics? |
|
|
|
ApiKey ApiKey[] |
|
|
|
AuthDevice AuthDevice[] |
|
|
|
Order Order[] |
|
|
|
Settings Settings? |
|
|
|
SymbolProfile SymbolProfile[] |
|
|
|
Tag Tag[] |
|
|
|