1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-25 02:30:04 +08:00
SpaceVim/bundle/nvim-treesitter/tests/query/highlights/prisma/test.prisma
2022-04-14 12:01:23 +08:00

57 lines
1.3 KiB
Plaintext

generator client {
// ^ keyword
provider = "go run github.com/prisma/prisma-client-go"
// ^ variable
}
datasource db {
provider = "postgresql"
// ^ string
url = env("DATABASE_URL")
// ^ function
}
model User {
email String
// ^ type
username String @id
// ^ operator
password String
fullName String @map("full_name")
// ^ function
avatarUrl String @map("avatar_url")
about String?
// ^ type
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
@@map("user")
}
model Reaction {
// ^ punctuation.bracket
id Int @id @default(autoincrement())
// ^ punctuation.bracket
postId Int @map("post_id")
userId String @map("user_id")
type ReactionType
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
post Post @relation(fields: [postId], references: [id])
// ^ property
user User @relation(fields: [userId], references: [username])
// ^ punctuation.bracket
@@map("reaction")
}
enum ReactionType {
// ^ keyword
LIKE
HAHA
SAD
ANGRY
// ^ constant
}