package org.springblade.modules.martial.service.schedule.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;

import java.time.LocalDate;

/**
 * Time slot model for schedule arrangement
 * Represents a time period (morning/afternoon/evening) on a specific date
 * 
 * @author Refactored from MartialScheduleArrangeServiceImpl
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TimeSlot {
    
    /**
     * Date of the time slot
     */
    private LocalDate date;
    
    /**
     * Period: morning, afternoon, evening
     */
    private String period;
    
    /**
     * Start time in HH:mm format (e.g., "08:00", "14:00", "19:00")
     */
    private String startTime;
    
    /**
     * Capacity in minutes
     */
    private Integer capacity;
    
    /**
     * Get unique key for this time slot
     */
    public String getSlotKey() {
        return date.toString() + "_" + period;
    }
    
    /**
     * Check if this is a morning slot
     */
    public boolean isMorning() {
        return "morning".equals(period);
    }
    
    /**
     * Check if this is an afternoon slot
     */
    public boolean isAfternoon() {
        return "afternoon".equals(period);
    }
    
    /**
     * Check if this is an evening slot
     */
    public boolean isEvening() {
        return "evening".equals(period);
    }
}
