organization
Table: organization
The organization table stores details of organizations associated with the system.
It tracks creation, updates, and soft-deletion (voiding) of each organization.
Columns
| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| organizationId | int(11) | NOT NULL, PRIMARY KEY | Unique identifier for the organization |
| createdDate | datetime | NULL | Timestamp when the organization record was created |
| dateRegistered | datetime | NULL | Official registration date of the organization |
| lastEditedDate | datetime | NULL | Timestamp when the organization record was last updated |
| organizationName | varchar(100) | NULL | Name of the organization |
| voided | tinyint(1) | NULL | Flag indicating if the record is voided (1 = voided, 0 = active) |
| voidedDate | datetime | NULL | Timestamp when the record was voided |
| voidedReason | varchar(50) | NULL | Reason for voiding the record |
| createdByUserId | int(11) | NULL | ID of the user who created the record (references user.mappedId) |
| lastEditedByUserId | int(11) | NULL | ID of the user who last edited the record (references user.mappedId) |
Indexes
- PRIMARY - Primary key on
organizationId - organization_lastEditedByUserId_user_mappedId_FK - Index on
lastEditedByUserId - organization_createdByUserId_user_mappedId_FK - Index on
createdByUserId
Foreign Key Relations
-
organization_createdByUserId_user_mappedId_FK→user.mappedId- Links the organization record to the user who created it
-
organization_lastEditedByUserId_user_mappedId_FK→user.mappedId- Links the organization record to the user who last edited it
Usage Notes
- Maintains organization information including registration and audit details.
voidedandvoidedReasonallow soft deletion of records without permanent removal.- Indexed for efficient lookup by creator or last editor of the organization.