# public.dynamic_credential_resolver

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(16) |  | false | [public.credentials_entity](public.credentials_entity.md) [public.dynamic_credential_user_entry](public.dynamic_credential_user_entry.md) [public.dynamic_credential_entry](public.dynamic_credential_entry.md) |  |  |
| name | varchar(128) |  | false |  |  |  |
| type | varchar(128) |  | false |  |  |  |
| config | text |  | false |  |  | Encrypted resolver configuration (JSON encrypted as string) |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| dynamic_credential_resolver_config_not_null | n | NOT NULL config |
| dynamic_credential_resolver_createdAt_not_null | n | NOT NULL "createdAt" |
| dynamic_credential_resolver_id_not_null | n | NOT NULL id |
| dynamic_credential_resolver_name_not_null | n | NOT NULL name |
| dynamic_credential_resolver_type_not_null | n | NOT NULL type |
| dynamic_credential_resolver_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_b76cfb088dcdaf5275e9980bb64 | PRIMARY KEY | PRIMARY KEY (id) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| PK_b76cfb088dcdaf5275e9980bb64 | CREATE UNIQUE INDEX "PK_b76cfb088dcdaf5275e9980bb64" ON public.dynamic_credential_resolver USING btree (id) |
| IDX_9c9ee9df586e60bb723234e499 | CREATE INDEX "IDX_9c9ee9df586e60bb723234e499" ON public.dynamic_credential_resolver USING btree (type) |

## Relations

```mermaid
erDiagram

"public.credentials_entity" }o--o| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE SET NULL"
"public.dynamic_credential_user_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (#quot;resolverId#quot;) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"
"public.dynamic_credential_entry" }o--|| "public.dynamic_credential_resolver" : "FOREIGN KEY (resolver_id) REFERENCES dynamic_credential_resolver(id) ON DELETE CASCADE"

"public.dynamic_credential_resolver" {
  varchar_16_ id
  varchar_128_ name
  varchar_128_ type
  text config
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
}
"public.credentials_entity" {
  varchar_128_ name
  text data
  varchar_128_ type
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
  varchar_36_ id
  boolean isManaged
  boolean isGlobal
  boolean isResolvable
  boolean resolvableAllowFallback
  varchar_16_ resolverId FK
}
"public.dynamic_credential_user_entry" {
  varchar_16_ credentialId FK
  uuid userId FK
  varchar_16_ resolverId FK
  text data
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
}
"public.dynamic_credential_entry" {
  varchar_16_ credential_id FK
  varchar_2048_ subject_id
  varchar_16_ resolver_id FK
  text data
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
}
```

---

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