# contract_term_condition_history

## Description

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

```sql
CREATE TABLE `contract_term_condition_history` (
  `contract_term_condition_history_id` mediumint unsigned NOT NULL AUTO_INCREMENT,
  `contract_term_condition_id` mediumint unsigned NOT NULL,
  `contract_term_id` mediumint unsigned NOT NULL,
  `contract_term_condition_name` varchar(180) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `conditions` json NOT NULL,
  `term_rate` decimal(5,2) NOT NULL,
  `commission` decimal(5,2) DEFAULT NULL,
  `priority` tinyint NOT NULL DEFAULT '1',
  `created_by` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `last_modified_by` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `last_modified` datetime NOT NULL,
  `deleted_by` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`contract_term_condition_history_id`)
) ENGINE=InnoDB AUTO_INCREMENT=[Redacted by tbls] DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
```

</details>

## Columns

| Name                               | Type               | Default | Nullable | Extra Definition | Children | Parents                                               | Comment |
| ---------------------------------- | ------------------ | ------- | -------- | ---------------- | -------- | ----------------------------------------------------- | ------- |
| commission                         | decimal(5,2)       |         | true     |                  |          |                                                       |         |
| conditions                         | json               |         | false    |                  |          |                                                       |         |
| contract_term_condition_history_id | mediumint unsigned |         | false    | auto_increment   |          |                                                       |         |
| contract_term_condition_id         | mediumint unsigned |         | false    |                  |          | [contract_term_condition](contract_term_condition.md) |         |
| contract_term_condition_name       | varchar(180)       |         | true     |                  |          |                                                       |         |
| contract_term_id                   | mediumint unsigned |         | false    |                  |          | [contract_term](contract_term.md)                     |         |
| created_at                         | datetime           |         | false    |                  |          |                                                       |         |
| created_by                         | varchar(255)       |         | false    |                  |          |                                                       |         |
| deleted_at                         | datetime           |         | true     |                  |          |                                                       |         |
| deleted_by                         | varchar(255)       |         | true     |                  |          |                                                       |         |
| last_modified                      | datetime           |         | false    |                  |          |                                                       |         |
| last_modified_by                   | varchar(255)       |         | false    |                  |          |                                                       |         |
| priority                           | tinyint            | 1       | false    |                  |          |                                                       |         |
| term_rate                          | decimal(5,2)       |         | false    |                  |          |                                                       |         |

## Constraints

| Name    | Type        | Definition                                       |
| ------- | ----------- | ------------------------------------------------ |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (contract_term_condition_history_id) |

## Indexes

| Name    | Definition                                                   |
| ------- | ------------------------------------------------------------ |
| PRIMARY | PRIMARY KEY (contract_term_condition_history_id) USING BTREE |

## Relations

![er](contract_term_condition_history.svg)

---

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