Skip to content

Commit 00a565f

Browse files
committed
change comment name
1 parent 1067661 commit 00a565f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

prisma/schema.prisma

+9-7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ model User {
1919
email String @unique
2020
name String?
2121
posts Post[]
22+
books Book[]
2223
}
2324

2425
model Post {
@@ -34,14 +35,15 @@ model Post {
3435
likes BigInt
3536
}
3637

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+
3846
model Map {
3947
key String @id
4048
value String
4149
}
42-
43-
/// @@tRPCGen.model(hide: true)
44-
model Book {
45-
id Int @unique
46-
title String
47-
}

src/helpers/comments-helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DMMF } from '@prisma/generator-helper';
22

3-
const modelAttributeRegex = /(@@tRPCGen\.)+([A-z])+(\()+(.+)+(\))+/;
3+
const modelAttributeRegex = /(@@Gen\.)+([A-z])+(\()+(.+)+(\))+/;
44
const attributeNameRegex = /(?:\.)+([A-Za-z])+(?:\()+/;
55
const attributeArgsRegex = /(?:\()+([A-Za-z])+\:+(.+)+(?:\))+/;
66

0 commit comments

Comments
 (0)