package cn.iocoder.yudao.module.pms.controller.admin.iotmaterial.vo;

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

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

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

@Schema(description = "管理后台 - PMS 功能优化 物料分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class IotMaterialPageReqVO extends PageParam {

    @Schema(description = "物料组id", example = "14786")
    private Long materialGroupId;

    @Schema(description = "BOM叶子节点", example = "10893")
    private Long bomId;

    @Schema(description = "物料类型 ROH原材料 FERT成品 HALB半成品", example = "1")
    private String type;

    @Schema(description = "物料编码")
    private String code;

    @Schema(description = "物料名称", example = "芋艿")
    private String name;

    @Schema(description = "规格型号")
    private String model;

    @Schema(description = "单位 字典表")
    private String unit;

    @Schema(description = "SAP系统中的物料唯一编号")
    private String sapCode;

    @Schema(description = "同步状态 0未同步 1同步成功 2同步失败", example = "2")
    private Integer syncStatus;

    @Schema(description = "最后一次同步时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] syncTime;

    @Schema(description = "同步失败时的错误信息")
    private String syncError;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "状态 0启用  1停用", example = "2")
    private Integer status;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    /**
     * 扩展字段
     */
    @Schema(description = "物料编码列表", example = "2298,2938,923")
    private List<String> codes;
}