データベース設計書
データベース設計書
Generated by
prisma-markdown
default
erDiagram
"user" {
String id PK
String name
String email UK
Boolean emailVerified
String image "nullable"
String bio "nullable"
DateTime createdAt
DateTime updatedAt
}
"session" {
String id PK
DateTime expiresAt
String token UK
DateTime createdAt
DateTime updatedAt
String ipAddress "nullable"
String userAgent "nullable"
String userId FK
}
"account" {
String id PK
String accountId
String providerId
String userId FK
String accessToken "nullable"
String refreshToken "nullable"
String idToken "nullable"
DateTime accessTokenExpiresAt "nullable"
DateTime refreshTokenExpiresAt "nullable"
String scope "nullable"
String password "nullable"
DateTime createdAt
DateTime updatedAt
}
"verification" {
String id PK
String identifier
String value
DateTime expiresAt
DateTime createdAt
DateTime updatedAt
}
"portfolios" {
String id PK
String title
String slug UK
String company
DateTime date
Boolean current
String overview "nullable"
String description "nullable"
String content "nullable"
String thumbnail_temp "nullable"
String intro "nullable"
DateTime created_at
DateTime updated_at
}
"portfolio_images" {
String id PK
String portfolio_id FK
String url
}
"posts" {
String id PK
String title
String slug UK
DateTime date
String description "nullable"
String content
String content_raw "nullable"
String image_temp
Boolean sticky
String intro "nullable"
DateTime created_at
DateTime updated_at
}
"tags" {
String id PK
String name UK
}
"post_tags" {
String post_id FK
String tag_id FK
}
"post_images" {
String id PK
String post_id FK
String url
}
"user_experiences" {
String id PK
String user_id FK
String company
String company_url
Boolean contract "nullable"
String date
DateTime date_start "nullable"
DateTime date_end "nullable"
String description
String highlights
String image "nullable"
String tags
String title
DateTime created_at
DateTime updated_at
}
"user_socials" {
String id PK
String user_id FK
String icon
String title
String url
DateTime created_at
DateTime updated_at
}
"session" }o--|| "user" : user
"account" }o--|| "user" : user
"portfolio_images" }o--|| "portfolios" : portfolio
"post_tags" }o--|| "posts" : post
"post_tags" }o--|| "tags" : tag
"post_images" }o--|| "posts" : post
"user_experiences" }o--|| "user" : user
"user_socials" }o--|| "user" : user
user
Properties as follows:
id:name:email:emailVerified:image:bio:createdAt:updatedAt:
session
Properties as follows:
id:expiresAt:token:createdAt:updatedAt:ipAddress:userAgent:userId:
account
Properties as follows:
id:accountId:providerId:userId:accessToken:refreshToken:idToken:accessTokenExpiresAt:refreshTokenExpiresAt:scope:password:createdAt:updatedAt:
verification
Properties as follows:
id:identifier:value:expiresAt:createdAt:updatedAt:
portfolios
Properties as follows:
id:title:slug:company:date:current:overview:description:content:thumbnail_temp:intro:created_at:updated_at:
portfolio_images
Properties as follows:
id:portfolio_id:url:
posts
Properties as follows:
id:title:slug:date:description:content:content_raw:image_temp:sticky:intro:created_at:updated_at:
tags
Properties as follows:
id:name:
post_tags
Properties as follows:
post_id:tag_id:
post_images
Properties as follows:
id:post_id:url:
user_experiences
Properties as follows:
id:user_id:company:company_url:contract:date:date_start:date_end:description:highlights:image:tags:title:created_at:updated_at:
user_socials
Properties as follows:
id:user_id:icon:title:url:created_at:updated_at: