nestjs_backend/prisma/schema.prisma
2022-08-19 19:20:38 +09:00

33 lines
756 B
Plaintext

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
//데이터베이스 연동
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
password String
name String
role String @default("USER")
is_done Boolean? @default(false)
updatedAt DateTime? @db.Timestamp(0)
createdAt DateTime @default(now())
}
//만들려는 모델
model Todo {
id Int @id @default(autoincrement())
title String
content String?
is_done Boolean? @default(false)
updatedAt DateTime? @db.Timestamp(0)
createdAt DateTime @default(now())
}