Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | VARCHAR | 36 | null |
|
|
||||||
| location_business_line_id | VARCHAR | 36 | √ | null |
|
|
|||||
| client_id | VARCHAR | 36 | null |
|
|
||||||
| billing_batch_id | VARCHAR | 36 | √ | null |
|
|
|||||
| amount | DECIMAL | 10,2 | null |
|
|
||||||
| due_date | DATE | 10 | null |
|
|
||||||
| paid_date | DATE | 10 | √ | null |
|
|
|||||
| status | VARCHAR | 20 | DRAFT |
|
|
||||||
| created_at | TIMESTAMP | 19 | CURRENT_TIMESTAMP |
|
|
||||||
| updated_at | TIMESTAMP | 19 | √ | null |
|
|
|||||
| created_by | VARCHAR | 255 | √ | system |
|
|
|||||
| updated_by | VARCHAR | 255 | √ | system |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| idx_client_id | Performance | Asc | client_id |
| idx_due_date | Performance | Asc | due_date |
| idx_invoices_billing_batch_id | Performance | Asc | billing_batch_id |
| idx_invoices_location_business_line | Performance | Asc | location_business_line_id |
| idx_status | Performance | Asc | status |
| uq_invoices_batch_client_scope | Must be unique | Asc/Asc/Asc | location_business_line_id + billing_batch_id + client_id |