Commit 00a565f 1 parent 1067661 commit 00a565f Copy full SHA for 00a565f
File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ model User {
19
19
email String @unique
20
20
name String ?
21
21
posts Post []
22
+ books Book []
22
23
}
23
24
24
25
model Post {
@@ -34,14 +35,15 @@ model Post {
34
35
likes BigInt
35
36
}
36
37
37
- /// @@tRPCGen.model(hide: true)
38
+ /// @@Gen.model(hide: true)
39
+ model Book {
40
+ id Int @unique
41
+ title String
42
+ author User ? @relation (fields : [authorId ] , references : [id ] )
43
+ authorId Int ?
44
+ }
45
+
38
46
model Map {
39
47
key String @id
40
48
value String
41
49
}
42
-
43
- /// @@tRPCGen.model(hide: true)
44
- model Book {
45
- id Int @unique
46
- title String
47
- }
Original file line number Diff line number Diff line change 1
1
import { DMMF } from '@prisma/generator-helper' ;
2
2
3
- const modelAttributeRegex = / ( @ @ t R P C G e n \. ) + ( [ A - z ] ) + ( \( ) + ( .+ ) + ( \) ) + / ;
3
+ const modelAttributeRegex = / ( @ @ G e n \. ) + ( [ A - z ] ) + ( \( ) + ( .+ ) + ( \) ) + / ;
4
4
const attributeNameRegex = / (?: \. ) + ( [ A - Z a - z ] ) + (?: \( ) + / ;
5
5
const attributeArgsRegex = / (?: \( ) + ( [ A - Z a - z ] ) + \: + ( .+ ) + (?: \) ) + / ;
6
6
You can’t perform that action at this time.
0 commit comments