package cn.iocoder.yudao.module.bpm.api.oa.vo.evection;

import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author 符溶馨
 */
@Schema(description = "管理后台 - 出差申请  请求Request VO")
@Data
@ToString(callSuper = true)
public class BpmOAEvectionDTO {

    @Schema(description = "入职申请表单主键", example = "1")
    private Long id;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "出差原因", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "出差事由不能为空")
    private String reason;

    @Schema(description = "随行人用户编号")
    private Set<Long> togetherUserIds;

    @Schema(description = "随行人用户名称")
    private String togetherUserName;

    @Schema(description = "出差起点", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "出差起点不能为空")
    private String startLocation;

    @Schema(description = "出差终点", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "出差终点不能为空")
    private String endLocation;

    @Schema(description = "出差的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开始时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime startTime;

    @Schema(description = "出差的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "结束时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endTime;

    @Schema(description = "出差时长", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "出差时长不能为空")
    private BigDecimal timeLength;

    @Schema(description = "上传文件", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<UploadUserFile> fileItems;
}
