# public.trusted_key_source

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| id | varchar(36) |  | false | [public.trusted_key](public.trusted_key.md) |  |  |
| type | varchar(32) |  | false |  |  |  |
| config | text |  | false |  |  |  |
| status | varchar(32) | 'pending'::character varying | false |  |  |  |
| lastError | text |  | true |  |  |  |
| lastRefreshedAt | timestamp(3) with time zone |  | true |  |  |  |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| trusted_key_source_config_not_null | n | NOT NULL config |
| trusted_key_source_createdAt_not_null | n | NOT NULL "createdAt" |
| trusted_key_source_id_not_null | n | NOT NULL id |
| trusted_key_source_status_not_null | n | NOT NULL status |
| trusted_key_source_type_not_null | n | NOT NULL type |
| trusted_key_source_updatedAt_not_null | n | NOT NULL "updatedAt" |
| PK_99e8908ce2c2cdccce487db7fc6 | PRIMARY KEY | PRIMARY KEY (id) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| PK_99e8908ce2c2cdccce487db7fc6 | CREATE UNIQUE INDEX "PK_99e8908ce2c2cdccce487db7fc6" ON public.trusted_key_source USING btree (id) |

## Relations

```mermaid
erDiagram

"public.trusted_key" }o--|| "public.trusted_key_source" : "FOREIGN KEY (#quot;sourceId#quot;) REFERENCES trusted_key_source(id) ON DELETE CASCADE"

"public.trusted_key_source" {
  varchar_36_ id
  varchar_32_ type
  text config
  varchar_32_ status
  text lastError
  timestamp_3__with_time_zone lastRefreshedAt
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
}
"public.trusted_key" {
  varchar_36_ sourceId FK
  varchar_255_ kid
  text data
  timestamp_3__with_time_zone createdAt
}
```

---

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