# role_mapping_rule_project

## Description

<details>
<summary><strong>Table Definition</strong></summary>

```sql
CREATE TABLE "role_mapping_rule_project" ("roleMappingRuleId" varchar(16) NOT NULL, "projectId" varchar(36) NOT NULL, CONSTRAINT "FK_dd7ce4dfa09e95b36a626bd9de3" FOREIGN KEY ("roleMappingRuleId") REFERENCES "role_mapping_rule" ("id") ON DELETE CASCADE, CONSTRAINT "FK_35a78869286c65d9330d02b88f5" FOREIGN KEY ("projectId") REFERENCES "project" ("id") ON DELETE CASCADE, PRIMARY KEY ("roleMappingRuleId", "projectId"))
```

</details>

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| roleMappingRuleId | varchar(16) |  | false |  | [role_mapping_rule](role_mapping_rule.md) |  |
| projectId | varchar(36) |  | false |  | [project](project.md) |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| roleMappingRuleId | PRIMARY KEY | PRIMARY KEY (roleMappingRuleId) |
| projectId | PRIMARY KEY | PRIMARY KEY (projectId) |
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
| sqlite_autoindex_role_mapping_rule_project_1 | PRIMARY KEY | PRIMARY KEY (roleMappingRuleId, projectId) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| IDX_35a78869286c65d9330d02b88f | CREATE INDEX "IDX_35a78869286c65d9330d02b88f" ON "role_mapping_rule_project" ("projectId")  |
| sqlite_autoindex_role_mapping_rule_project_1 | PRIMARY KEY (roleMappingRuleId, projectId) |

## Relations

```mermaid
erDiagram

"role_mapping_rule_project" |o--|| "role_mapping_rule" : "FOREIGN KEY (roleMappingRuleId) REFERENCES role_mapping_rule (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"role_mapping_rule_project" |o--|| "project" : "FOREIGN KEY (projectId) REFERENCES project (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"

"role_mapping_rule_project" {
  varchar_16_ roleMappingRuleId PK
  varchar_36_ projectId PK
}
"role_mapping_rule" {
  varchar_16_ id PK
  TEXT expression
  varchar_128_ role FK
  varchar_64_ type
  INTEGER order
  datetime_3_ createdAt
  datetime_3_ updatedAt
}
"project" {
  varchar_36_ id PK
  varchar_255_ name
  varchar_36_ type
  datetime_3_ createdAt
  datetime_3_ updatedAt
  TEXT icon
  varchar_512_ description
  varchar creatorId FK
  TEXT customTelemetryTags
}
```

---

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