File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ generator client {
16
16
* User model
17
17
*/
18
18
model User {
19
- id String @id @default(cuid())
20
- email String @unique @email
21
- password String @password @omit @length(8, 16)
22
- posts Post[]
19
+ id String @id @default(cuid())
20
+ email String @unique @email @length(6, 32)
21
+ password String @password @omit
22
+ posts Post[]
23
23
24
24
// everybody can signup
25
25
@@allow('create', true)
@@ -32,14 +32,14 @@ model User {
32
32
* Post model
33
33
*/
34
34
model Post {
35
- id String @id @default(cuid())
35
+ id String @id @default(cuid())
36
36
createdAt DateTime @default(now())
37
37
updatedAt DateTime @updatedAt
38
- title String @length(1, 256)
39
- content String
40
- published Boolean @default(false)
41
- author User @relation(fields: [authorId], references: [id])
42
- authorId String
38
+ title String @length(1, 256)
39
+ content String
40
+ published Boolean @default(false)
41
+ author User @relation(fields: [authorId], references: [id])
42
+ authorId String
43
43
44
44
// allow read for all signin users
45
45
@@allow('read', auth() != null && published)
You can’t perform that action at this time.
0 commit comments