package com.njcn.rdms.module.project.controller.admin.project.project.vo.workbench;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

@Schema(description = "管理后台 - 工作台「团队工时周聚合」Response VO")
@Data
public class TeamWorklogWeekRespVO {

    @Schema(description = "所选周周一", requiredMode = Schema.RequiredMode.REQUIRED, example = "2026-06-08")
    private LocalDate weekStart;
    @Schema(description = "团队成员工时列表;members[0] 恒为当前用户;该周无填报的成员 items 为空数组", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<MemberVO> members;

    @Schema(description = "单个成员的周工时")
    @Data
    public static class MemberVO {
        @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
        @JsonSerialize(using = ToStringSerializer.class)
        private Long userId;
        @Schema(description = "用户昵称", example = "张三")
        private String userNickname;
        @Schema(description = "本周工时按归属分布", requiredMode = Schema.RequiredMode.REQUIRED)
        private List<MyWorklogWeekRespVO.DistributionItemVO> items;
    }

}
