@a_team/prisma 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -5,8 +5,15 @@ import { PrismaClient } from "@prisma/client";
|
|
|
5
5
|
const prisma = new PrismaClient();
|
|
6
6
|
|
|
7
7
|
async function main() {
|
|
8
|
-
const missionSpec = await prisma.missionSpec.
|
|
9
|
-
|
|
8
|
+
const missionSpec = await prisma.missionSpec.findUnique({
|
|
9
|
+
where: { id: "66b3856aa504b6860c86f3ac" },
|
|
10
|
+
select: {
|
|
11
|
+
account: {
|
|
12
|
+
select: {
|
|
13
|
+
company: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
10
17
|
});
|
|
11
18
|
console.log(missionSpec);
|
|
12
19
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// npx ts-node playground/missionSpecs.ts
|
|
2
|
+
|
|
3
|
+
import { PrismaClient } from "@prisma/client";
|
|
4
|
+
|
|
5
|
+
const prisma = new PrismaClient();
|
|
6
|
+
|
|
7
|
+
async function main() {
|
|
8
|
+
const missionSpec = await prisma.missionSpec.findMany({
|
|
9
|
+
take: 5,
|
|
10
|
+
});
|
|
11
|
+
console.log(missionSpec);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
main()
|
|
15
|
+
.then(async () => {
|
|
16
|
+
await prisma.$disconnect();
|
|
17
|
+
})
|
|
18
|
+
.catch(async (e) => {
|
|
19
|
+
console.error(e);
|
|
20
|
+
await prisma.$disconnect();
|
|
21
|
+
});
|
|
@@ -12,16 +12,17 @@ type AccountsWorkspace {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
model Account {
|
|
15
|
-
id String
|
|
16
|
-
clientCompany String?
|
|
17
|
-
clientCompanyModel ClientCompany?
|
|
18
|
-
company
|
|
15
|
+
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
16
|
+
clientCompany String? @db.ObjectId
|
|
17
|
+
clientCompanyModel ClientCompany? @relation(fields: [clientCompany], references: [id])
|
|
18
|
+
companyId String @map("company") @db.ObjectId
|
|
19
|
+
company Company @relation(fields: [companyId], references: [id])
|
|
19
20
|
members AccountsMember[]
|
|
20
21
|
workspace AccountsWorkspace?
|
|
21
|
-
billingAccount String?
|
|
22
|
-
createdAt DateTime?
|
|
23
|
-
updatedAt DateTime?
|
|
24
|
-
deletedAt DateTime?
|
|
22
|
+
billingAccount String? @db.ObjectId
|
|
23
|
+
createdAt DateTime? @db.Date
|
|
24
|
+
updatedAt DateTime? @db.Date
|
|
25
|
+
deletedAt DateTime? @db.Date
|
|
25
26
|
migrations String[]
|
|
26
27
|
missions Mission[]
|
|
27
28
|
missionSpecs MissionSpec[]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type StructuredEnrichment {
|
|
2
|
+
name String?
|
|
3
|
+
countryCode String?
|
|
4
|
+
city String?
|
|
5
|
+
timezone String?
|
|
6
|
+
companyStage String?
|
|
7
|
+
logoURL String?
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type CompanyEnrichment {
|
|
11
|
+
structured StructuredEnrichment?
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
model Company {
|
|
15
|
+
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
16
|
+
accounts Account[]
|
|
17
|
+
name String
|
|
18
|
+
url String
|
|
19
|
+
enrichment CompanyEnrichment
|
|
20
|
+
createdBy String? @db.ObjectId
|
|
21
|
+
createdAt DateTime? @db.Date
|
|
22
|
+
updatedAt DateTime? @db.Date
|
|
23
|
+
|
|
24
|
+
@@index([name, createdAt], map: "name_1_createdAt_-1")
|
|
25
|
+
@@index([url], map: "url_1")
|
|
26
|
+
@@map("companiesV2")
|
|
27
|
+
}
|