Skip to main content

compliancemanagement

Table: compliancemanagement

The compliancemanagement table stores records of compliance checks at various locations.
It tracks the status, observations, and audit information for compliance monitoring and reporting.


Columns

Column NameData TypeConstraintsDescription
complianceManagementIdint(11)NOT NULL, AUTO_INCREMENTUnique identifier for each compliance record
complianceDatedatetimeNULLDate of the compliance check
createdDatedatetimeNULLTimestamp when the record was created
descriptionvarchar(50)NULLShort description of the compliance activity
lastEditedDatedatetimeNULLTimestamp when the record was last modified
locationIdint(11)NULLReferences the location where compliance was checked
mappedIdint(11)NOT NULLReference ID from the id mapping system
statusvarchar(20)NULLStatus of compliance (e.g., compliant, non-compliant)
voidedtinyint(1)NULLSoft deletion flag (1 = voided, 0 = active)
voidedDatedatetimeNULLDate when the record was voided
voidedReasonvarchar(50)NULLReason for voiding the record
createdByUserIdint(11)NULLUser who created the record
lastEditedByUserIdint(11)NULLUser who last edited the record

Indexes

  1. PRIMARY - Primary key on complianceManagementId
  2. complianceManagement_locationId_location_locationId_FK - Index on locationId
  3. mappedId_compliance_FK - Index on mappedId
  4. complianceManagement_lastEditedByUserId_user_mappedId_FK - Index on lastEditedByUserId
  5. complianceManagement_createdByUserId_user_mappedId_FK - Index on createdByUserId

Foreign Key Relations

  1. complianceManagement_createdByUserId_user_mappedId_FK

    • createdByUserIduser.mappedId
    • Tracks who created the record
  2. complianceManagement_lastEditedByUserId_user_mappedId_FK

    • lastEditedByUserIduser.mappedId
    • Tracks who last edited the record
  3. complianceManagement_locationId_location_locationId_FK

    • locationIdlocation.locationId
    • Associates the record with a specific location
  4. mappedId_compliance_FK

    • mappedIdidmapper.mappedId
    • Reference to ID mapping system

Usage Notes

  • Tracks compliance activities for monitoring and reporting purposes.
  • status indicates whether compliance requirements were met.
  • Soft deletion is handled via voided, voidedDate, and voidedReason.
  • Audit fields (createdByUserId, lastEditedByUserId, createdDate, lastEditedDate) maintain history.
  • Ensures referential integrity with user, location, and idmapper tables.