package com.unicorn.hgzero.stt.dto;

import lombok.Builder;
import lombok.Getter;
import lombok.ToString;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;

import java.time.LocalDateTime;

/**
 * 녹음 관련 DTO 클래스들
 */
public class RecordingDto {
    
    /**
     * 녹음 준비 요청 DTO
     */
    @Getter
    @Builder
    @ToString
    public static class PrepareRequest {
        
        @NotBlank(message = "회의 ID는 필수입니다")
        private final String meetingId;
        
        @NotBlank(message = "세션 ID는 필수입니다")
        private final String sessionId;
        
        private final String language;
        
        @Min(value = 1, message = "참석자 수는 1명 이상이어야 합니다")
        @Max(value = 50, message = "참석자 수는 50명을 초과할 수 없습니다")
        private final Integer attendeeCount;
    }
    
    /**
     * 녹음 준비 응답 DTO
     */
    @Getter
    @Builder
    @ToString
    public static class PrepareResponse {

        private final String recordingId;
        private final String sessionId;
        private final String status;
        private final String streamUrl;
        private final Integer estimatedInitTime;
    }
    
    /**
     * 녹음 시작 요청 DTO
     */
    @Getter
    @Builder
    @ToString
    public static class StartRequest {
        
        @NotBlank(message = "시작자 ID는 필수입니다")
        private final String startedBy;
        
        private final String recordingMode;
    }
    
    /**
     * 녹음 중지 요청 DTO
     */
    @Getter
    @Builder
    @ToString
    public static class StopRequest {
        
        @NotBlank(message = "중지자 ID는 필수입니다")
        private final String stoppedBy;
        
        private final String reason;
    }
    
    /**
     * 녹음 상태 응답 DTO
     */
    @Getter
    @Builder
    @ToString
    public static class StatusResponse {

        private final String recordingId;
        private final String status;
        private final LocalDateTime startTime;
        private final LocalDateTime endTime;
        private final Integer duration;
    }
    
    /**
     * 녹음 상세 응답 DTO
     */
    @Getter
    @Builder
    @ToString
    public static class DetailResponse {

        private final String recordingId;
        private final String meetingId;
        private final String sessionId;
        private final String status;
        private final LocalDateTime startTime;
        private final LocalDateTime endTime;
        private final Integer duration;
        private final Integer speakerCount;
        private final Integer segmentCount;
        private final String language;
    }
}