package com.flightticket.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * Configuration for data retention policies.
 * Requirement: 16.5
 */
@Configuration
@ConfigurationProperties(prefix = "data.retention")
@Data
public class DataRetentionConfig {
    
    /**
     * Number of days to retain audit logs before purging.
     * Default: 365 days (1 year)
     */
    private int auditLogRetentionDays = 365;
    
    /**
     * Number of days to retain booking data after completion.
     * Default: 730 days (2 years)
     */
    private int bookingRetentionDays = 730;
    
    /**
     * Number of days to retain ticket data after issuance.
     * Default: 1095 days (3 years)
     */
    private int ticketRetentionDays = 1095;
    
    /**
     * Number of days to retain wallet transaction history.
     * Default: 2555 days (7 years for financial records)
     */
    private int walletTransactionRetentionDays = 2555;
    
    /**
     * Number of days to retain notification history.
     * Default: 90 days (3 months)
     */
    private int notificationRetentionDays = 90;
    
    /**
     * Whether to enable automatic data purging.
     * Default: false (must be explicitly enabled in production)
     */
    private boolean autoPurgeEnabled = false;
    
    /**
     * Cron expression for scheduled purging job.
     * Default: Run daily at 2 AM
     */
    private String purgeScheduleCron = "0 0 2 * * ?";
}
