---
# System prepended metadata

title: CodiMD が使用するデータベーステーブルのER図　2021-05-12
tags: [CodiMD, ER図]

---

---
lang: ja-jp
breaks: true
---
# CodiMD が使用するデータベーステーブルのER図　2021-05-12

```plantuml
@startuml

skinparam {
	dpi 150
	backgroundColor transparent
	classAttributeIconSize 13
	defaultFontName Meiryo UI
}

!define MASTER_MARK_COLOR		AAFFAA
!define TRANSACTION_MARK_COLOR	FFAA00

entity Authors <<M, MASTER_MARK_COLOR>> {
	+ id [PK]
	--
	color
	# noteId
	# userId
    createdAt
    updatedAt
}

entity Notes <<T, TRANSACTION_MARK_COLOR>> {
	+ id [PK]
	--
	# ownerId
	content
	title
	createdAt
	updatedAt
	shortid
    permission
    viewcount
    lastchangeuserId
    lastchangeAt
    alias
    savedAt
    authorship
    deletedAt
}

entity Revisions <<T, TRANSACTION_MARK_COLOR>> {
	+ id [PK]
	--
	# noteId
	patch
	lastContent
	content
	length
	createdAt
    updatedAt
    authorship
}

entity SequelizeMeta <<T, TRANSACTION_MARK_COLOR>> {
	+ name [PK]
}

entity Sessions <<T, TRANSACTION_MARK_COLOR>> {
	+ sid [PK]
	--
	expires
	data
	createdAt
	updatedAt
}

entity Users <<M, MASTER_MARK_COLOR>> {
	+ id [PK]
	--
	profileid
	profile
	history
    createdAt
    updatedAt
    accessToken
    refreshToken
    email
    password
    deleteToken
}

Notes  --{ Authors
Notes  }-- Users
Notes  -{  Revisions
Authors }- Users

@enduml
```

###### tags: `CodiMD` `ER図`
