package com.njcn.rdms.module.project.controller.admin.project.task.vo.worklog;

import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 任务工时 Response VO")
@Data
public class TaskWorklogRespVO {

    @Schema(description = "工时记录编号", example = "11001")
    private Long id;

    @Schema(description = "任务编号", example = "9001")
    private Long taskId;

    @Schema(description = "填报人用户编号", example = "3002")
    private Long userId;

    @Schema(description = "填报人昵称", example = "张三")
    private String userNickname;

    @Schema(description = "段起始日期（含），单天=与 endDate 相等", example = "2026-05-04")
    private LocalDate startDate;

    @Schema(description = "段结束日期（含），单天=与 startDate 相等", example = "2026-05-08")
    private LocalDate endDate;

    @Schema(description = "本次填报小时数（0.5 颗粒）", example = "8.0")
    private BigDecimal durationHours;

    @Schema(description = "本次填报进度（0~100）", example = "60.00")
    private BigDecimal progressRate;

    @Schema(description = "完成难度编码（字典 rdms_worklog_difficulty）", example = "2")
    private String difficulty;

    @Schema(description = "完成难度名称（字典 label，后端不填、前端按字典 cache 自译）", example = "一般")
    private String difficultyName;

    @Schema(description = "工作内容描述")
    private String workContent;

    @Schema(description = "附件列表")
    private List<AttachmentItem> attachments;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}
