package com.zt.plat.module.qms.resource.material.controller.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zt.plat.module.qms.resource.material.dal.dataobject.MaterialInventoryCheckItemDO;
import com.zt.plat.module.qms.resource.material.valid.AddGroup;
import com.zt.plat.module.qms.resource.material.valid.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;

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

@Schema(description = "管理后台 - 物料通用流程,物料验收、退换货新增/修改 Request VO")
@Data
public class MaterialLifecycleSaveReqVO {

    @Null(groups = AddGroup.class, message = "新增操作 id必须为空")
    @NotNull(groups = UpdateGroup.class, message = "修改操作 id不能为空")
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "7663")
    private Long id;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "业务类型,验收、退换货、配置申请、检定校准、库存盘点", example = "2")
    @NotNull(groups = AddGroup.class, message = "业务类型不能为空")
    private String businessType;

    @Schema(description = "业务类型编码")
    private String businessTypeCode;

    @Schema(description = "申请人")
    private String applyUser;

    @Schema(description = "申请人id", example = "4976")
    private Long applyUserId;

    @Schema(description = "申请部门")
    private String applyDepartment;

    @Schema(description = "申请部门id", example = "19765")
    private Long applyDepartmentId;

    @Schema(description = "申请时间")
    private LocalDateTime applyTime;

    // 盘点部门ids
    @Schema(description = "盘点部门ids")
    private List<Long> departmentIds;

    @Schema(description = "库房ids")
    private List<Long> warehouseIds;

    @Schema(description = "执行人id")
    private Long operatorId;

    @Schema(description = "执行人")
    private String operatorName;

    @Schema(description = "执行进度")
    private String progress;

    @Schema(description = "表单数据,表单数据")
    private String formData;

    @Schema(description = "事由/说明")
    private String reason;

    @Schema(description = "所属部门")
    private String systemDepartmentCode;

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

    @Schema(description = "盘点项")
    private List<MaterialInventoryCheckItemSaveReqVO> checkItems;

    @Schema(description = "明细列表")
    private List<MaterialLifecycleDetailSaveReqVO> detailList;

    @Schema(description = "删除的文件id")
    private List<Long> deleteFileIdList;

}