package com.r11.tools.configuration;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.validation.constraints.Positive;

/**
 * Store all properties needed to change a retention in {@link RetentionConfiguration}
 *
 * @author Mikołaj Widła
 */

@Configuration
@ConfigurationProperties(prefix = "retention")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class RetentionConfigurationProperties {
    @Positive
    private Integer minutesToDeleteMessage;
    @Positive
    private Integer minutesToDeleteHistoryRecord;
    @Positive
    private Integer retentionCooldown;
}
