@a_team/prisma 1.0.7 → 1.0.8

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/.env.sample ADDED
@@ -0,0 +1,4 @@
1
+ # Copy this file to .env and fill in the values
2
+
3
+ # for example: mongodb+srv://xxx.mongodb.net/ATeamsSandbox?retryWrites=true&w=majority&readPreference=secondary"
4
+ MONGODB_URL=
package/README.md CHANGED
@@ -23,6 +23,24 @@ import { PrismaClient } from "@prisma/client";
23
23
  const prisma = new PrismaClient();
24
24
  ```
25
25
 
26
+ ## Playground
27
+
28
+ The playground is a dedicated space where you can test and experiment with the Prisma client and schema. It contains various scripts that demonstrate how to interact with your database models.
29
+
30
+ Before running any playground scripts, make sure to set up your environment variables. First, copy the `.env.sample` file to `.env`:
31
+
32
+ ```sh
33
+ cp .env.sample .env
34
+ ```
35
+
36
+ Then, fill in the required environment variables in the `.env` file.
37
+
38
+ To run a playground script, use the following command:
39
+
40
+ ```sh
41
+ npx ts-node playground/missionSpec.ts
42
+ ```
43
+
26
44
  ## Publishing
27
45
 
28
46
  To publish updates to this package, use the following command:
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@a_team/prisma",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "keywords": [],
5
5
  "scripts": {
6
6
  "generate": "npx prisma generate",
7
+ "format": "npx prisma format",
7
8
  "postinstall": "npm run generate"
8
9
  },
9
10
  "repository": {
@@ -14,7 +15,9 @@
14
15
  "license": "ISC",
15
16
  "devDependencies": {
16
17
  "@prisma/client": "^5.17.0",
17
- "prisma": "^5.17.0"
18
+ "prisma": "^5.17.0",
19
+ "ts-node": "^10.9.2",
20
+ "typescript": "^5.5.4"
18
21
  },
19
22
  "peerDependencies": {
20
23
  "@prisma/client": ">=5"
@@ -0,0 +1,21 @@
1
+ // npx ts-node playground/missionSpec.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
+ });
@@ -1,29 +1,30 @@
1
1
  type AccountsMember {
2
- user String @db.ObjectId
3
- accessLevel String?
4
- invitedAt DateTime? @db.Date
2
+ user String @db.ObjectId
3
+ accessLevel String?
4
+ invitedAt DateTime? @db.Date
5
5
  }
6
6
 
7
7
  type AccountsWorkspace {
8
- name String
9
- description String?
10
- logo String?
11
- website String?
8
+ name String
9
+ description String?
10
+ logo String?
11
+ website String?
12
12
  }
13
13
 
14
14
  model Account {
15
- id String @id @default(auto()) @map("_id") @db.ObjectId
16
- clientCompany String? @db.ObjectId
17
- clientCompanyModel ClientCompany? @relation(fields: [clientCompany], references: [id])
18
- company EnrichableCompany[]
19
- members AccountsMember[]
20
- workspace AccountsWorkspace?
21
- billingAccount String? @db.ObjectId
22
- createdAt DateTime? @db.Date
23
- updatedAt DateTime? @db.Date
24
- deletedAt DateTime? @db.Date
25
- migrations String[]
26
- missions Mission[]
15
+ id String @id @default(auto()) @map("_id") @db.ObjectId
16
+ clientCompany String? @db.ObjectId
17
+ clientCompanyModel ClientCompany? @relation(fields: [clientCompany], references: [id])
18
+ company EnrichableCompany[]
19
+ members AccountsMember[]
20
+ workspace AccountsWorkspace?
21
+ billingAccount String? @db.ObjectId
22
+ createdAt DateTime? @db.Date
23
+ updatedAt DateTime? @db.Date
24
+ deletedAt DateTime? @db.Date
25
+ migrations String[]
26
+ missions Mission[]
27
+ missionSpecs MissionSpec[]
27
28
 
28
- @@map("accounts")
29
+ @@map("accounts")
29
30
  }
@@ -1,15 +1,16 @@
1
1
  model ClientCompany {
2
- id String @id @default(auto()) @map("_id") @db.ObjectId
3
- createdAt DateTime? @db.Date
4
- author String? @db.ObjectId
5
- name String
6
- slug String?
7
- product String?
8
- website String?
9
- size String?
10
- description String?
11
- logo String?
12
- accounts Account[]
2
+ id String @id @default(auto()) @map("_id") @db.ObjectId
3
+ createdAt DateTime? @db.Date
4
+ author String? @db.ObjectId
5
+ name String
6
+ slug String?
7
+ product String?
8
+ website String?
9
+ size String?
10
+ description String?
11
+ logo String?
12
+ accounts Account[]
13
+ missionSpecs MissionSpec[]
13
14
 
14
- @@map("clientCompanies")
15
+ @@map("clientCompanies")
15
16
  }
@@ -0,0 +1,9 @@
1
+ type LocalHourRange {
2
+ endTime Int?
3
+ startTime Int?
4
+ }
5
+
6
+ type TimezoneObject {
7
+ name String
8
+ utcOffset Int
9
+ }
@@ -1,8 +1,8 @@
1
1
  model EnrichableCompany {
2
- id String @id @default(auto()) @map("_id") @db.ObjectId
3
- name String
4
- accountId String? @db.ObjectId
5
- accountModel Account? @relation(fields: [accountId], references: [id])
2
+ id String @id @default(auto()) @map("_id") @db.ObjectId
3
+ name String
4
+ accountId String? @db.ObjectId
5
+ accountModel Account? @relation(fields: [accountId], references: [id])
6
6
 
7
- @@map("companiesV2")
7
+ @@map("companiesV2")
8
8
  }
@@ -1,190 +1,172 @@
1
1
  type MissionRoleAvailability {
2
- date DateTime? @db.Date
3
- scheduledEndDate DateTime? @db.Date
4
- weeklyHoursAvailable Float
2
+ date DateTime? @db.Date
3
+ scheduledEndDate DateTime? @db.Date
4
+ weeklyHoursAvailable Float
5
5
  }
6
6
 
7
7
  type MissionRoleCustomQuestion {
8
- id String @map("_id") @db.ObjectId
9
- createdAt DateTime? @db.Date
10
- isRequired Boolean?
11
- isVisible Boolean
12
- text String
13
- updatedAt DateTime? @db.Date
8
+ id String @map("_id") @db.ObjectId
9
+ createdAt DateTime? @db.Date
10
+ isRequired Boolean?
11
+ isVisible Boolean
12
+ text String
13
+ updatedAt DateTime? @db.Date
14
14
  }
15
15
 
16
16
  type MissionRolePreferredSkill {
17
- rating Int?
18
- talentSkillId String @db.ObjectId
17
+ rating Int?
18
+ talentSkillId String @db.ObjectId
19
19
  }
20
20
 
21
21
  type MissionRoleRequiredSkill {
22
- rating Int?
23
- talentSkillId String @db.ObjectId
22
+ rating Int?
23
+ talentSkillId String @db.ObjectId
24
24
  }
25
25
 
26
26
  type MissionRoleUtcOffsetRange {
27
- from TimezoneObject?
28
- to TimezoneObject?
29
- }
30
-
31
- type TimezoneObject {
32
- name String
33
- utcOffset Int
27
+ from TimezoneObject?
28
+ to TimezoneObject?
34
29
  }
35
30
 
36
31
  type MissionRoleVisibility {
37
- visibilityStatus String
32
+ visibilityStatus String
38
33
  }
39
34
 
40
35
  type MissionRoleWorkingHours {
41
- id String? @map("_id") @db.ObjectId
42
- daily LocalHourRange[]
43
- name String?
44
- numberOfMinutesOverlap Int?
45
- utcDaylightHours LocalHourRange[]
46
- utcOffset Int?
47
- utcStandardHours LocalHourRange[]
48
- }
49
-
50
- type LocalHourRange {
51
- endTime Int?
52
- startTime Int?
36
+ id String? @map("_id") @db.ObjectId
37
+ daily LocalHourRange[]
38
+ name String?
39
+ numberOfMinutesOverlap Int?
40
+ utcDaylightHours LocalHourRange[]
41
+ utcOffset Int?
42
+ utcStandardHours LocalHourRange[]
53
43
  }
54
44
 
55
45
  type MissionRole {
56
- id String @map("_id") @db.ObjectId
57
- availability MissionRoleAvailability?
58
- builderRateMax Float?
59
- builderRateMin Float?
60
- category String @db.ObjectId
61
- createdAt DateTime? @db.Date
62
- customQuestions MissionRoleCustomQuestion[]
63
- description String?
64
- fullName String?
65
- hasPerformanceIssue Boolean?
66
- headline String?
67
- hourlyRate Float?
68
- monthlyRate Float?
69
- isBadPerformance Boolean?
70
- isLead Boolean?
71
- locations String[]
72
- lookingForApplications Boolean?
73
- marginVAT Float?
74
- preferredSkills MissionRolePreferredSkill[]
75
- requiredSkills MissionRoleRequiredSkill[]
76
- setAsScheduledToEndAt DateTime? @db.Date
77
- showRateRangeToBuilders Boolean?
78
- status String?
79
- updatedAt DateTime? @db.Date
80
- user String? @db.ObjectId
81
- userAssignedAt DateTime? @db.Date
82
- utcOffsetRange MissionRoleUtcOffsetRange?
83
- visibility MissionRoleVisibility?
84
- workingHours MissionRoleWorkingHours?
85
- builderMonthlyRateMin Float?
86
- builderMonthlyRateMax Float?
87
- collectMonthlyRate Boolean?
88
- isFullTimeRetainer Boolean?
46
+ id String @map("_id") @db.ObjectId
47
+ availability MissionRoleAvailability?
48
+ builderRateMax Float?
49
+ builderRateMin Float?
50
+ category String @db.ObjectId
51
+ createdAt DateTime? @db.Date
52
+ customQuestions MissionRoleCustomQuestion[]
53
+ description String?
54
+ fullName String?
55
+ hasPerformanceIssue Boolean?
56
+ headline String?
57
+ hourlyRate Float?
58
+ monthlyRate Float?
59
+ isBadPerformance Boolean?
60
+ isLead Boolean?
61
+ locations String[]
62
+ lookingForApplications Boolean?
63
+ marginVAT Float?
64
+ preferredSkills MissionRolePreferredSkill[]
65
+ requiredSkills MissionRoleRequiredSkill[]
66
+ setAsScheduledToEndAt DateTime? @db.Date
67
+ showRateRangeToBuilders Boolean?
68
+ status String?
69
+ updatedAt DateTime? @db.Date
70
+ user String? @db.ObjectId
71
+ userAssignedAt DateTime? @db.Date
72
+ utcOffsetRange MissionRoleUtcOffsetRange?
73
+ visibility MissionRoleVisibility?
74
+ workingHours MissionRoleWorkingHours?
75
+ builderMonthlyRateMin Float?
76
+ builderMonthlyRateMax Float?
77
+ collectMonthlyRate Boolean?
78
+ isFullTimeRetainer Boolean?
89
79
  }
90
80
 
91
81
  type MissionsManager {
92
- id String @map("_id") @db.ObjectId
93
- accessMode String
94
- excludeFromInvoiceEmails Boolean?
95
- excludeFromTeamPulseEmails Boolean?
82
+ id String @map("_id") @db.ObjectId
83
+ accessMode String
84
+ excludeFromInvoiceEmails Boolean?
85
+ excludeFromTeamPulseEmails Boolean?
96
86
  }
97
87
 
98
88
  type MissionsAttachedLink {
99
- URL String
100
- title String
89
+ URL String
90
+ title String
101
91
  }
102
92
 
103
93
  type MissionsCompanyRequest {
104
- companyName String
105
- description String
106
- email String
107
- fullName String
108
- notes String?
109
- phoneNumber String
110
- role String
111
- websiteURL String
94
+ companyName String
95
+ description String
96
+ email String
97
+ fullName String
98
+ notes String?
99
+ phoneNumber String
100
+ role String
101
+ websiteURL String
112
102
  }
113
103
 
114
104
  type MissionsInvoicing {
115
- purchaseOrderNumber String?
105
+ purchaseOrderNumber String?
116
106
  }
117
107
 
118
108
  type MissionsTesting {
119
- expiresAt DateTime @db.Date
120
- type String
109
+ expiresAt DateTime @db.Date
110
+ type String
121
111
  }
122
112
 
123
113
  type WorkingHoursSchema {
124
- name String
125
- utcOffset Int
126
- daily LocalHourRange[]
127
- utcStandardHours LocalHourRange[]
128
- utcDaylightHours LocalHourRange[]
129
- }
130
-
131
- model TalentIndustry {
132
- id String @id @default(auto()) @map("_id") @db.ObjectId
133
- description String
134
- name String
135
- textId String @unique(map: "textId_1")
136
-
137
- @@map("talentIndustries")
114
+ name String
115
+ utcOffset Int
116
+ daily LocalHourRange[]
117
+ utcStandardHours LocalHourRange[]
118
+ utcDaylightHours LocalHourRange[]
138
119
  }
139
120
 
140
121
  model Mission {
141
- mid String @id @default(auto()) @map("_id") @db.ObjectId
142
- accountId String? @db.ObjectId
143
- accountModel Account? @relation(fields: [accountId], references: [id])
144
- applyStatus String?
145
- attachedLinks MissionsAttachedLink[]
146
- automatedStatusesDisabled Boolean?
147
- automaticInvoicingPeriod String?
148
- bdOwners String[]
149
- billingPeriod String?
150
- clientMargin Float?
151
- companyRequest MissionsCompanyRequest?
152
- companyStory String?
153
- createdAt DateTime? @db.Date
154
- creatorUser String? @db.ObjectId
155
- creatorModel User? @relation("creator", fields: [creatorUser], references: [id])
156
- description String?
157
- expectedDurationMonths Int?
158
- hidden Boolean?
159
- hubspotDealId String?
160
- internalDescription String?
161
- internalMission Boolean?
162
- invoiceEmailGreeting String?
163
- invoicing MissionsInvoicing?
164
- lastDeployedAt DateTime? @db.Date
165
- logoURL String?
166
- mainManagerUserId String?
167
- managers MissionsManager[]
168
- migrations String[]
169
- missionSpecId String? @db.ObjectId
170
- owner String? @db.ObjectId
171
- ownerModel User? @relation("ownerModel", fields: [owner], references: [id])
172
- promotedTags String[]
173
- publishedAt DateTime? @db.Date
174
- publisherUser String? @db.ObjectId
175
- roles MissionRole[]
176
- rolesMargin Float?
177
- setAsScheduledToEndAt DateTime? @db.Date
178
- shortCompanyDescription String?
179
- skipContracts Boolean?
180
- status String
181
- talentIndustries String[]
182
- testing MissionsTesting?
183
- title String
184
- updatedAt DateTime? @db.Date
185
- videoURL String?
186
- website String?
187
-
188
- @@unique([roles.id], map: "roles._id_1")
189
- @@map("missions")
122
+ mid String @id @default(auto()) @map("_id") @db.ObjectId
123
+ accountId String? @db.ObjectId
124
+ accountModel Account? @relation(fields: [accountId], references: [id])
125
+ applyStatus String?
126
+ attachedLinks MissionsAttachedLink[]
127
+ automatedStatusesDisabled Boolean?
128
+ automaticInvoicingPeriod String?
129
+ bdOwners String[]
130
+ billingPeriod String?
131
+ clientMargin Float?
132
+ companyRequest MissionsCompanyRequest?
133
+ companyStory String?
134
+ createdAt DateTime? @db.Date
135
+ creatorUser String? @db.ObjectId
136
+ creatorModel User? @relation("creator", fields: [creatorUser], references: [id])
137
+ description String?
138
+ expectedDurationMonths Int?
139
+ hidden Boolean?
140
+ hubspotDealId String?
141
+ internalDescription String?
142
+ internalMission Boolean?
143
+ invoiceEmailGreeting String?
144
+ invoicing MissionsInvoicing?
145
+ lastDeployedAt DateTime? @db.Date
146
+ logoURL String?
147
+ mainManagerUserId String?
148
+ managers MissionsManager[]
149
+ migrations String[]
150
+ missionSpecId String @unique @db.ObjectId
151
+ missionSpec MissionSpec @relation(fields: [missionSpecId], references: [id])
152
+ owner String? @db.ObjectId
153
+ ownerModel User? @relation("ownerModel", fields: [owner], references: [id])
154
+ promotedTags String[]
155
+ publishedAt DateTime? @db.Date
156
+ publisherUser String? @db.ObjectId
157
+ roles MissionRole[]
158
+ rolesMargin Float?
159
+ setAsScheduledToEndAt DateTime? @db.Date
160
+ shortCompanyDescription String?
161
+ skipContracts Boolean?
162
+ status String
163
+ talentIndustries String[]
164
+ testing MissionsTesting?
165
+ title String
166
+ updatedAt DateTime? @db.Date
167
+ videoURL String?
168
+ website String?
169
+
170
+ @@unique([roles.id], map: "roles._id_1")
171
+ @@map("missions")
190
172
  }
@@ -0,0 +1,105 @@
1
+ model MissionSpec {
2
+ id String @id @default(auto()) @map("_id") @db.ObjectId
3
+ account Account? @relation(fields: [accountId], references: [id])
4
+ accountId String? @db.ObjectId
5
+ attachedLinks AttachedLink[]
6
+ author User? @relation(fields: [authorId], references: [id], name: "author")
7
+ authorId String? @map("author") @db.ObjectId
8
+ clientCompany ClientCompany? @relation(fields: [clientCompanyId], references: [id])
9
+ clientCompanyId String? @map("clientCompany") @db.ObjectId
10
+ clientConfirmed Boolean?
11
+ collaborators String[] @db.ObjectId
12
+ companyDescription String?
13
+ createdAt DateTime? @db.Date
14
+ deletedAt DateTime? @db.Date
15
+ description String?
16
+ icon String?
17
+ lastModifier User? @relation(fields: [lastModifierId], references: [id], name: "lastModifier")
18
+ lastModifierId String? @map("lastModifier") @db.ObjectId
19
+ logo String?
20
+ metadata Metadata?
21
+ mission Mission?
22
+ platformId String? @db.ObjectId
23
+ roles MissionSpecRole[]
24
+ startDate DateTime? @db.Date
25
+ status MissionSpecStatus
26
+ statusChangedAt StatusTime?
27
+ title String
28
+ updatedAt DateTime? @db.Date
29
+ v Int @map("__v")
30
+ videoURL String?
31
+ workingHours WorkingHours?
32
+ workingHoursNumberOfMinutesOverlap Int?
33
+
34
+ @@index([accountId], map: "accountId_1")
35
+ @@index([authorId, deletedAt, platformId, createdAt], map: "author_1_deletedAt_1_platformId_1_createdAt_1")
36
+ @@index([accountId, deletedAt, platformId, createdAt], map: "accountId_1_deletedAt_1_platformId_1_createdAt_1")
37
+ @@map("missionSpecs")
38
+ }
39
+
40
+ type MissionSpecRole {
41
+ id String @map("_id") @db.ObjectId
42
+ builderRateMax Int?
43
+ builderRateMin Int?
44
+ category String? @db.ObjectId
45
+ createdAt DateTime? @default(now()) @db.Date
46
+ createdBy String? @db.ObjectId
47
+ customQuestions ClientRoleQuestion[]
48
+ description String?
49
+ isLead Boolean @default(false)
50
+ locations String[]
51
+ minimumCommitment Int?
52
+ preferredSkills String[] @db.ObjectId
53
+ requiredSkills String[] @db.ObjectId
54
+ typicalHourlyRate Int?
55
+ user String? @db.ObjectId
56
+ }
57
+
58
+ type AttachedLink {
59
+ URL String
60
+ title String
61
+ }
62
+
63
+ type Metadata {
64
+ lastGeneratedAiDescriptionAt DateTime? @db.Date
65
+ lastGeneratedAiDescription String?
66
+ generatedFromGongCallAt DateTime? @db.Date
67
+ landbotCustomerId String?
68
+ bridgeType String?
69
+ }
70
+
71
+ enum MissionSpecStatus {
72
+ spec
73
+ formation
74
+ proposal
75
+ confirmed
76
+ declined
77
+ published
78
+ }
79
+
80
+ type StatusTime {
81
+ spec DateTime? @db.Date
82
+ formation DateTime? @db.Date
83
+ proposal DateTime? @db.Date
84
+ confirmed DateTime? @db.Date
85
+ declined DateTime? @db.Date
86
+ published DateTime? @db.Date
87
+ }
88
+
89
+ type WorkingHours {
90
+ name String
91
+ utcOffset Int
92
+ daily LocalHourRange[]
93
+ utcStandardHours LocalHourRange[]
94
+ utcDaylightHours LocalHourRange[]
95
+ numberOfMinutesOverlap Int?
96
+ }
97
+
98
+ type ClientRoleQuestion {
99
+ id String? @map("_id") @db.ObjectId
100
+ text String
101
+ isRequired Boolean?
102
+ isVisible Boolean?
103
+ createdAt DateTime @db.Date
104
+ updatedAt DateTime? @db.Date
105
+ }
@@ -1,10 +1,10 @@
1
1
  model RoleCategory {
2
- id String @id @default(auto()) @map("_id") @db.ObjectId
3
- anchors String[]
4
- title String @unique(map: "title_1")
5
- deletedAt DateTime? @db.Date
6
- group String?
7
- talentCategoryIds String[]
2
+ id String @id @default(auto()) @map("_id") @db.ObjectId
3
+ anchors String[]
4
+ title String @unique(map: "title_1")
5
+ deletedAt DateTime? @db.Date
6
+ group String?
7
+ talentCategoryIds String[]
8
8
 
9
- @@map("roleCategories")
9
+ @@map("roleCategories")
10
10
  }
@@ -1,10 +1,10 @@
1
1
  datasource db {
2
- provider = "mongodb"
3
- url = env("MONGODB_URL")
2
+ provider = "mongodb"
3
+ url = env("MONGODB_URL")
4
4
  }
5
5
 
6
6
  generator client {
7
- provider = "prisma-client-js"
8
- binaryTargets = ["native", "darwin"]
9
- previewFeatures = ["prismaSchemaFolder"]
7
+ provider = "prisma-client-js"
8
+ binaryTargets = ["native", "darwin"]
9
+ previewFeatures = ["prismaSchemaFolder"]
10
10
  }
@@ -1,13 +1,13 @@
1
1
  model TalentCategory {
2
- id String @id @default(auto()) @map("_id") @db.ObjectId
3
- textId String
4
- name String
5
- nodeType String
6
- parentTalentCategoryIds String[]
7
- aliases String[]
8
- isProgrammingLanguage Boolean?
9
- isVettingEligible Boolean?
10
- deletedAt DateTime?
2
+ id String @id @default(auto()) @map("_id") @db.ObjectId
3
+ textId String
4
+ name String
5
+ nodeType String
6
+ parentTalentCategoryIds String[]
7
+ aliases String[]
8
+ isProgrammingLanguage Boolean?
9
+ isVettingEligible Boolean?
10
+ deletedAt DateTime? @db.Date
11
11
 
12
- @@map("talentCategories")
12
+ @@map("talentCategories")
13
13
  }
@@ -0,0 +1,8 @@
1
+ model TalentIndustry {
2
+ id String @id @default(auto()) @map("_id") @db.ObjectId
3
+ description String
4
+ name String
5
+ textId String @unique(map: "textId_1")
6
+
7
+ @@map("talentIndustries")
8
+ }
@@ -1,17 +1,19 @@
1
1
  model User {
2
- id String @id @default(auto()) @map("_id") @db.ObjectId
3
- firstName String?
4
- lastName String?
5
- username String? @unique(map: "username_1")
6
- email String? @unique(map: "email_1")
7
- createdMissionsModels Mission[] @relation("creator")
8
- ownedMissionsModels Mission[] @relation("ownerModel")
9
- type String
10
- pictureURL String?
11
- status String
12
- createdAt DateTime
13
- titles String[]
14
- scrubbed String?
2
+ id String @id @default(auto()) @map("_id") @db.ObjectId
3
+ firstName String?
4
+ lastName String?
5
+ username String? @unique(map: "username_1")
6
+ email String? @unique(map: "email_1")
7
+ createdMissionsModels Mission[] @relation("creator")
8
+ ownedMissionsModels Mission[] @relation("ownerModel")
9
+ type String
10
+ pictureURL String?
11
+ status String
12
+ createdAt DateTime @db.Date
13
+ titles String[]
14
+ scrubbed String?
15
+ authoredMissionSpecs MissionSpec[] @relation("author")
16
+ modifiedMissionSpecs MissionSpec[] @relation("lastModifier")
15
17
 
16
- @@map("users")
18
+ @@map("users")
17
19
  }
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2016",
4
+ "module": "commonjs",
5
+ "esModuleInterop": true,
6
+ "forceConsistentCasingInFileNames": true,
7
+ "strict": true
8
+ }
9
+ }