package org.dromara.personnel.domain.bo;

import org.dromara.personnel.domain.OpsScheduling;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 运维-人员排班业务对象 ops_scheduling
 *
 * @author LionLi
 * @date 2025-09-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OpsScheduling.class, reverseConvertGenerate = false)
public class OpsSchedulingBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 项目id
     */
    @NotNull(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long projectId;

    /**
     * 运维人员id
     */
    private Long opsUserId;

    @NotNull(message = "运维人员列表不能为null",groups = { AddGroup.class})
    @Size(min = 1, message = "运维人员列表至少包含一个元素")
    private List<SchedulingUserTypeBo> userTypeBos;

    /**
     * 排班类型id
     */
//    @NotBlank(message = "排班类型id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long schedulingType;

    /**
     * 排班日期
     */
//    @NotNull(message = "排班日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDate schedulingDate;

    /**
     * 排班开始时间
     */
//    @NotNull(message = "排班开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDateTime schedulingStartTime;

    /**
     * 排班结束时间
     */
//    @NotNull(message = "排班结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDateTime schedulingEndTime;


}
