# account_payee_history

## Description

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

```sql
CREATE TABLE `account_payee_history` (
  `account_payee_history_id` mediumint unsigned NOT NULL AUTO_INCREMENT,
  `account_payee_id` mediumint unsigned NOT NULL,
  `account_id` mediumint unsigned NOT NULL,
  `payoneer_program_id` int unsigned DEFAULT NULL,
  `payoneer_payee_id` bigint unsigned DEFAULT NULL,
  `payoneer_payee_name` varchar(180) DEFAULT NULL,
  `payoneer_iframe_url` varchar(180) DEFAULT NULL,
  `payoneer_iframe_url_date` date DEFAULT NULL,
  `payoneer_session_id` varchar(180) DEFAULT NULL,
  `sap_vendor_id` int unsigned DEFAULT NULL,
  `reference_payment_type_id` smallint unsigned DEFAULT NULL,
  `payment_description` varchar(250) NOT NULL DEFAULT '',
  `created_by` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `last_modified_by` varchar(255) NOT NULL,
  `last_modified` datetime NOT NULL,
  PRIMARY KEY (`account_payee_history_id`),
  KEY `fk_account_payee_account_payee_history` (`account_payee_id`),
  KEY `fk_account_account_payee_history` (`account_id`),
  CONSTRAINT `fk_account_account_payee_history` FOREIGN KEY (`account_id`) REFERENCES `account` (`account_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_account_payee_account_payee_history` FOREIGN KEY (`account_payee_id`) REFERENCES `account_payee` (`account_payee_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=[Redacted by tbls] DEFAULT CHARSET=utf8mb3
```

</details>

## Columns

| Name                      | Type               | Default | Nullable | Extra Definition | Children | Parents                                             | Comment |
| ------------------------- | ------------------ | ------- | -------- | ---------------- | -------- | --------------------------------------------------- | ------- |
| account_id                | mediumint unsigned |         | false    |                  |          | [account](account.md)                               |         |
| account_payee_history_id  | mediumint unsigned |         | false    | auto_increment   |          |                                                     |         |
| account_payee_id          | mediumint unsigned |         | false    |                  |          | [account_payee](account_payee.md)                   |         |
| created_at                | datetime           |         | false    |                  |          |                                                     |         |
| created_by                | varchar(255)       |         | false    |                  |          |                                                     |         |
| last_modified             | datetime           |         | false    |                  |          |                                                     |         |
| last_modified_by          | varchar(255)       |         | false    |                  |          |                                                     |         |
| payment_description       | varchar(250)       |         | false    |                  |          |                                                     |         |
| payoneer_iframe_url       | varchar(180)       |         | true     |                  |          |                                                     |         |
| payoneer_iframe_url_date  | date               |         | true     |                  |          |                                                     |         |
| payoneer_payee_id         | bigint unsigned    |         | true     |                  |          |                                                     |         |
| payoneer_payee_name       | varchar(180)       |         | true     |                  |          |                                                     |         |
| payoneer_program_id       | int unsigned       |         | true     |                  |          |                                                     |         |
| payoneer_session_id       | varchar(180)       |         | true     |                  |          |                                                     |         |
| reference_payment_type_id | smallint unsigned  |         | true     |                  |          | [reference_payment_type](reference_payment_type.md) |         |
| sap_vendor_id             | int unsigned       |         | true     |                  |          |                                                     |         |

## Constraints

| Name                                   | Type        | Definition                                                                 |
| -------------------------------------- | ----------- | -------------------------------------------------------------------------- |
| PRIMARY                                | PRIMARY KEY | PRIMARY KEY (account_payee_history_id)                                     |
| fk_account_account_payee_history       | FOREIGN KEY | FOREIGN KEY (account_id) REFERENCES account (account_id)                   |
| fk_account_payee_account_payee_history | FOREIGN KEY | FOREIGN KEY (account_payee_id) REFERENCES account_payee (account_payee_id) |

## Indexes

| Name                                   | Definition                                                                |
| -------------------------------------- | ------------------------------------------------------------------------- |
| PRIMARY                                | PRIMARY KEY (account_payee_history_id) USING BTREE                        |
| fk_account_account_payee_history       | KEY fk_account_account_payee_history (account_id) USING BTREE             |
| fk_account_payee_account_payee_history | KEY fk_account_payee_account_payee_history (account_payee_id) USING BTREE |

## Relations

![er](account_payee_history.svg)

---

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