# Audit Log

The Audit Log object is used to record and track changes, actions, and events within the work order management system. It provides a detailed history of activities, ensuring transparency, accountability, and the ability to audit processes for compliance and security purposes.

#### Properties

**logId:**

* **Purpose:** Serves as a unique identifier for the audit log entry, allowing the system to reference and manage log entries programmatically.
* **Example:** "LOG67890", "LOG11223"

**entityId:**

* **Purpose:** Identifies the specific entity (e.g., task, work order, or user) that the log entry is related to, providing context for the recorded action.
* **Example:** "WO12345", "USR54321"

**entityType:**

* **Purpose:** Specifies the type of entity involved in the logged action, helping to categorize and filter log entries.
* **Example:** "WorkOrder", "User"

**changeType:**

* **Purpose:** Describes the nature of the action recorded in the log entry, such as creation, update, or deletion, indicating what type of change occurred.
* **Example:** "Created", "Deleted"

**userId:**

* **Purpose:** Identifies the user who performed the action, facilitating accountability and tracking user activities.
* **Example:** "USR67890", "USR54321"

**timestamp:**

* **Purpose:** Records the date and time when the action occurred, which is crucial for tracking, auditing, and understanding the sequence of events.
* **Example:** "2023-06-01T09:00:00Z", "2024-01-20T11:30:00Z"

**previousValue:**

* **Purpose:** Captures the value of the entity before the change, allowing for comparison and understanding of what was altered.
* **Example:** {"Priority": "Low"}, {"AssigneeId": "USR11111"}

**newValue:**

* **Purpose:** Captures the value of the entity after the change, documenting the result of the action.
* **Example:** {"Priority": "High"}, {"AssigneeId": "USR22222"}

#### Purpose in Work Order Management System

**Change Tracking:** Provides a detailed record of all changes and actions performed within the system, ensuring that all modifications are documented.

**Transparency:** Enhances transparency by maintaining a visible history of actions and changes, which can be reviewed by administrators and auditors.

**Accountability:** Holds users accountable for their actions by recording who made each change and when, promoting responsible behavior.

**Audit and Compliance:** Ensures that the system meets regulatory and compliance requirements by maintaining a comprehensive audit trail.

**Security:** Helps detect and investigate unauthorized or suspicious activities by providing a detailed log of all actions.

**Historical Reference:** Allows users and administrators to refer back to previous states and actions, aiding in troubleshooting and decision-making.
