Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | VARCHAR | 36 | null |
|
|
||||||
| user_id | VARCHAR | 36 | null |
|
|
||||||
| hr_document_id | VARCHAR | 36 | null |
|
|
||||||
| status | VARCHAR | 20 | MISSING |
|
|
||||||
| issue_date | DATE | 10 | √ | null |
|
|
|||||
| document_url | VARCHAR | 500 | √ | null |
|
|
|||||
| document_filename | VARCHAR | 255 | √ | null |
|
|
|||||
| expiration_date | DATE | 10 | √ | null |
|
|
|||||
| notes | TEXT | 65535 | √ | null |
|
|
|||||
| is_active | BIT | 1 | 1 |
|
|
||||||
| created_at | TIMESTAMP | 19 | CURRENT_TIMESTAMP |
|
|
||||||
| updated_at | TIMESTAMP | 19 | CURRENT_TIMESTAMP |
|
|
||||||
| created_by | VARCHAR | 255 | √ | null |
|
|
|||||
| updated_by | VARCHAR | 255 | √ | null |
|
|
|||||
| reviewed_by | VARCHAR | 36 | √ | null |
|
|
|||||
| reviewed_at | DATETIME | 19 | √ | null |
|
|
|||||
| rejection_reason | VARCHAR | 500 | √ | null |
|
|
|||||
| uploaded_by_user_id | VARCHAR | 36 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| idx_user_hr_documents_active | Performance | Asc | is_active |
| idx_user_hr_documents_document | Performance | Asc | hr_document_id |
| idx_user_hr_documents_expiration | Performance | Asc | expiration_date |
| idx_user_hr_documents_status | Performance | Asc | status |
| idx_user_hr_documents_user | Performance | Asc | user_id |
| uk_user_hr_document | Must be unique | Asc/Asc | user_id + hr_document_id |