# public.folder_tag

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| folderId | varchar(36) |  | false |  | [public.folder](public.folder.md) |  |
| tagId | varchar(36) |  | false |  | [public.tag_entity](public.tag_entity.md) |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| FK_94a60854e06f2897b2e0d39edba | FOREIGN KEY | FOREIGN KEY ("folderId") REFERENCES folder(id) ON DELETE CASCADE |
| FK_dc88164176283de80af47621746 | FOREIGN KEY | FOREIGN KEY ("tagId") REFERENCES tag_entity(id) ON DELETE CASCADE |
| PK_27e4e00852f6b06a925a4d83a3e | PRIMARY KEY | PRIMARY KEY ("folderId", "tagId") |
| folder_tag_folderId_not_null | n | NOT NULL "folderId" |
| folder_tag_tagId_not_null | n | NOT NULL "tagId" |

## Indexes

| Name | Definition |
| ---- | ---------- |
| PK_27e4e00852f6b06a925a4d83a3e | CREATE UNIQUE INDEX "PK_27e4e00852f6b06a925a4d83a3e" ON public.folder_tag USING btree ("folderId", "tagId") |

## Relations

```mermaid
erDiagram

"public.folder_tag" }o--|| "public.folder" : "FOREIGN KEY (#quot;folderId#quot;) REFERENCES folder(id) ON DELETE CASCADE"
"public.folder_tag" }o--|| "public.tag_entity" : "FOREIGN KEY (#quot;tagId#quot;) REFERENCES tag_entity(id) ON DELETE CASCADE"

"public.folder_tag" {
  varchar_36_ folderId FK
  varchar_36_ tagId FK
}
"public.folder" {
  timestamp_3__with_time_zone createdAt
  varchar_36_ id
  varchar_128_ name
  varchar_36_ parentFolderId FK
  varchar_36_ projectId FK
  timestamp_3__with_time_zone updatedAt
}
"public.tag_entity" {
  timestamp_3__with_time_zone createdAt
  varchar_36_ id
  varchar_24_ name
  timestamp_3__with_time_zone updatedAt
}
```

---

> Generated by [tbls](https://github.com/k1LoW/tbls)
