package cn.iocoder.yudao.module.asset.controller.admin.inspection.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

/**
 * 验车记录详情 Response VO
 */
@Schema(description = "管理后台 - 验车记录详情 Response VO")
@Data
public class InspectionRecordDetailVO {

    @Schema(description = "主键ID", example = "1")
    private Long id;

    @Schema(description = "记录编码", example = "BC-20260313-001")
    private String recordCode;

    @Schema(description = "模板ID", example = "1")
    private Long templateId;

    @Schema(description = "来源类型（1=备车 2=交车 3=还车）", example = "1")
    private Integer sourceType;

    @Schema(description = "来源ID", example = "1")
    private Long sourceId;

    @Schema(description = "车辆ID", example = "1")
    private Long vehicleId;

    @Schema(description = "检查人", example = "张三")
    private String inspectorName;

    @Schema(description = "检查时间")
    private LocalDateTime inspectionTime;

    @Schema(description = "状态（0=待检 1=检查中 2=已完成）", example = "0")
    private Integer status;

    @Schema(description = "总体结果（1=通过 2=不通过 3=不适用）", example = "1")
    private Integer overallResult;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "克隆来源记录ID", example = "1")
    private Long clonedFromId;

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

    @Schema(description = "检查项列表")
    private List<InspectionRecordItemVO> items;

    /**
     * 验车记录检查项 VO
     */
    @Schema(description = "验车记录检查项 VO")
    @Data
    public static class InspectionRecordItemVO {

        @Schema(description = "主键ID", example = "1")
        private Long id;

        @Schema(description = "检查项编码", example = "BODY_PAINT")
        private String itemCode;

        @Schema(description = "分类", example = "外观检查")
        private String category;

        @Schema(description = "检查项名称", example = "车身漆面")
        private String itemName;

        @Schema(description = "输入类型", example = "checkbox")
        private String inputType;

        @Schema(description = "检查结果（1=通过 2=不通过 3=不适用）", example = "1")
        private Integer result;

        @Schema(description = "检查值", example = "正常")
        private String value;

        @Schema(description = "备注")
        private String remark;

        @Schema(description = "图片URL列表")
        private String imageUrls;

    }

}
