Browse Source

Rename Account to accounts in platform database schema

pull/4656/head
Thomas Kaul 4 months ago
parent
commit
83663d641a
  1. 4
      apps/api/src/app/platform/platform.service.ts
  2. 8
      prisma/schema.prisma

4
apps/api/src/app/platform/platform.service.ts

@ -54,7 +54,7 @@ export class PlatformService {
await this.prismaService.platform.findMany({ await this.prismaService.platform.findMany({
include: { include: {
_count: { _count: {
select: { Account: true } select: { accounts: true }
} }
} }
}); });
@ -64,7 +64,7 @@ export class PlatformService {
id, id,
name, name,
url, url,
accountCount: _count.Account accountCount: _count.accounts
}; };
}); });
} }

8
prisma/schema.prisma

@ -147,10 +147,10 @@ model Order {
} }
model Platform { model Platform {
id String @id @default(uuid()) accounts Account[]
name String? id String @id @default(uuid())
url String @unique name String?
Account Account[] url String @unique
@@index([name]) @@index([name])
} }

Loading…
Cancel
Save