package de.effigenix.application.usermanagement;

/**
 * Audit events for HACCP/GoBD compliance.
 * All events are logged immutably with timestamp, actor, IP, user agent.
 *
 * Retention: 10 years (gesetzlich für HACCP/GoBD).
 */
public enum AuditEvent {
    // ==================== User Management ====================
    USER_CREATED,
    USER_UPDATED,
    USER_DELETED,
    USER_LOCKED,
    USER_UNLOCKED,
    USER_ACTIVATED,
    USER_DEACTIVATED,

    ROLE_ASSIGNED,
    ROLE_REMOVED,

    PASSWORD_CHANGED,
    PASSWORD_CHANGE_FAILED,
    PASSWORD_RESET,

    LOGIN_SUCCESS,
    LOGIN_FAILED,
    LOGIN_BLOCKED,  // User is locked
    LOGOUT,

    // ==================== Quality BC (HACCP-relevant) ====================
    TEMPERATURE_RECORDED,
    TEMPERATURE_CRITICAL,  // Critical limit exceeded
    CLEANING_PERFORMED,
    GOODS_INSPECTED,
    HACCP_REPORT_GENERATED,

    // ==================== Production BC ====================
    BATCH_CREATED,
    BATCH_COMPLETED,
    RECIPE_CREATED,
    RECIPE_MODIFIED,
    RECIPE_DELETED,

    // ==================== Inventory BC ====================
    STOCK_ADJUSTED,
    STOCK_MOVEMENT_RECORDED,
    INVENTORY_COUNT_PERFORMED,
    STOCK_BATCH_BLOCKED,
    STOCK_BATCH_UNBLOCKED,

    // ==================== Procurement BC ====================
    PURCHASE_ORDER_CREATED,
    PURCHASE_ORDER_APPROVED,
    GOODS_RECEIVED,

    // ==================== Sales BC ====================
    ORDER_CREATED,
    ORDER_COMPLETED,
    INVOICE_GENERATED,

    // ==================== System ====================
    SYSTEM_SETTINGS_CHANGED,
    BRANCH_CREATED,
    BRANCH_MODIFIED
}
