package tech.easyflow.chatlog.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.time.Duration;

@Component
@ConfigurationProperties(prefix = "easyflow.chat.cache")
public class ChatCacheProperties {

    private Duration sessionListTtl = Duration.ofMinutes(5);
    private Duration sessionSummaryTtl = Duration.ofMinutes(10);
    private Duration sessionTailTtl = Duration.ofMinutes(30);
    private int tailSize = 50;

    public Duration getSessionListTtl() {
        return sessionListTtl;
    }

    public void setSessionListTtl(Duration sessionListTtl) {
        this.sessionListTtl = sessionListTtl;
    }

    public Duration getSessionSummaryTtl() {
        return sessionSummaryTtl;
    }

    public void setSessionSummaryTtl(Duration sessionSummaryTtl) {
        this.sessionSummaryTtl = sessionSummaryTtl;
    }

    public Duration getSessionTailTtl() {
        return sessionTailTtl;
    }

    public void setSessionTailTtl(Duration sessionTailTtl) {
        this.sessionTailTtl = sessionTailTtl;
    }

    public int getTailSize() {
        return tailSize;
    }

    public void setTailSize(int tailSize) {
        this.tailSize = tailSize;
    }
}
