# public.tag_entity

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |
| id | varchar(36) |  | false | [public.folder_tag](public.folder_tag.md) [public.workflows_tags](public.workflows_tags.md) |  |  |
| name | varchar(24) |  | false |  |  |  |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| tag_entity_createdAt_not_null | n | NOT NULL "createdAt" |
| tag_entity_id_not_null1 | n | NOT NULL id |
| tag_entity_name_not_null | n | NOT NULL name |
| tag_entity_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| tag_entity_updatedAt_not_null | n | NOT NULL "updatedAt" |

## Indexes

| Name | Definition |
| ---- | ---------- |
| idx_812eb05f7451ca757fb98444ce | CREATE UNIQUE INDEX idx_812eb05f7451ca757fb98444ce ON public.tag_entity USING btree (name) |
| pk_tag_entity_id | CREATE UNIQUE INDEX pk_tag_entity_id ON public.tag_entity USING btree (id) |
| tag_entity_pkey | CREATE UNIQUE INDEX tag_entity_pkey ON public.tag_entity USING btree (id) |

## Relations

```mermaid
erDiagram

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

"public.tag_entity" {
  timestamp_3__with_time_zone createdAt
  varchar_36_ id
  varchar_24_ name
  timestamp_3__with_time_zone updatedAt
}
"public.folder_tag" {
  varchar_36_ folderId FK
  varchar_36_ tagId FK
}
"public.workflows_tags" {
  varchar_36_ tagId FK
  varchar_36_ workflowId FK
}
```

---

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