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 {
1616 * User model 
1717 */  
1818model  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[]
2323
2424    // everybody can signup 
2525    @@allow('create' , true )
@@ -32,14 +32,14 @@ model User {
3232 * Post model 
3333 */  
3434model  Post {
35-     id String  @id @default(cuid())
35+     id         String     @id @default(cuid())
3636    createdAt DateTime  @default(now())
3737    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 
4343
4444    // allow read for all signin users 
4545    @@allow('read' , auth() != null  && published)
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments