package com.zhongshu.card.client.model.devices.permiss;

import com.zhongshu.card.client.type.device.WeekDayType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 星期数据
 *
 * @author TRX
 * @date 2024/12/19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TimeSlotWeekModel {

    @Schema(description = "星期几")
    private WeekDayType weekDayType;

    private String weekDayTypeStr;

    public String getWeekDayTypeStr() {
        if (weekDayType != null) {
            return weekDayType.getRemark();
        }
        return "";
    }

    @Schema(description = "时间段数据")
    private List<TimeSlotModel> timeSlots = new ArrayList<>();
}
