# payment_group_payment_batch

## Description

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

```sql
CREATE TABLE `payment_group_payment_batch` (
  `payment_group_payment_batch_id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `payment_group_payment_id` mediumint unsigned NOT NULL,
  `payoneer_program_id` int unsigned NOT NULL,
  `batch_num` 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,
  PRIMARY KEY (`payment_group_payment_batch_id`),
  KEY `fk_payment_batch_payment_group_payment` (`payment_group_payment_id`),
  KEY `fk_payment_batch_reference_payoneer_program` (`payoneer_program_id`),
  CONSTRAINT `fk_payment_batch_payment_group_payment` FOREIGN KEY (`payment_group_payment_id`) REFERENCES `payment_group_payment` (`payment_group_payment_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_payment_batch_reference_payoneer_program` FOREIGN KEY (`payoneer_program_id`) REFERENCES `reference_payoneer_program` (`payoneer_program_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) 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 |
| ------------------------------ | ------------------ | ------- | -------- | ---------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------- | ------- |
| batch_num                      | tinyint            | 1       | false    |                  |                                                                               |                                                             |         |
| created_at                     | datetime           |         | false    |                  |                                                                               |                                                             |         |
| created_by                     | varchar(255)       |         | false    |                  |                                                                               |                                                             |         |
| last_modified                  | datetime           |         | false    |                  |                                                                               |                                                             |         |
| last_modified_by               | varchar(255)       |         | false    |                  |                                                                               |                                                             |         |
| payment_group_payment_batch_id | bigint unsigned    |         | false    | auto_increment   | [payment_group_payment_batch_account](payment_group_payment_batch_account.md) |                                                             |         |
| payment_group_payment_id       | mediumint unsigned |         | false    |                  |                                                                               | [payment_group_payment](payment_group_payment.md)           |         |
| payoneer_program_id            | int unsigned       |         | false    |                  |                                                                               | [reference_payoneer_program](reference_payoneer_program.md) |         |

## Constraints

| Name                                        | Type        | Definition                                                                                         |
| ------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------- |
| PRIMARY                                     | PRIMARY KEY | PRIMARY KEY (payment_group_payment_batch_id)                                                       |
| fk_payment_batch_payment_group_payment      | FOREIGN KEY | FOREIGN KEY (payment_group_payment_id) REFERENCES payment_group_payment (payment_group_payment_id) |
| fk_payment_batch_reference_payoneer_program | FOREIGN KEY | FOREIGN KEY (payoneer_program_id) REFERENCES reference_payoneer_program (payoneer_program_id)      |

## Indexes

| Name                                        | Definition                                                                        |
| ------------------------------------------- | --------------------------------------------------------------------------------- |
| PRIMARY                                     | PRIMARY KEY (payment_group_payment_batch_id) USING BTREE                          |
| fk_payment_batch_payment_group_payment      | KEY fk_payment_batch_payment_group_payment (payment_group_payment_id) USING BTREE |
| fk_payment_batch_reference_payoneer_program | KEY fk_payment_batch_reference_payoneer_program (payoneer_program_id) USING BTREE |

## Relations

![er](payment_group_payment_batch.svg)

---

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