package cn.skcks.docking.gb28181.wvp.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.time.Duration;
import java.time.temporal.ChronoUnit;

@Component
@ConfigurationProperties(prefix = "proxy.gb28181.device-api", ignoreInvalidFields = true)
@Order(0)
@Data
public class Gb28181DeviceVideoApiConfig {
    private Offset offset = new Offset();

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Offset {
        private Duration forward = Duration.of(0, ChronoUnit.SECONDS);
        private Duration back= Duration.of(0, ChronoUnit.SECONDS);
    }
}
