package com.zt.plat.module.base.api.materialhasproperties.dto;

import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 物料持有属性分页 Request DTO
 */
@Data
public class MaterialHasPropertiesPageReqDTO extends PageParam {

    @Schema(description = "物料信息ID", example = "2614")
    private Long infomationId;

    @Schema(description = "属性ID", example = "8607")
    private Long propertiesId;

    @Schema(description = "计量单位ID-默认计量单位", example = "23731")
    private Long unitId;

    @Schema(description = "属性值")
    private String value;

    @Schema(description = "是否关键属性-关键属性表示物料唯一性")
    private Integer isKey;

    @Schema(description = "是否计量定价")
    private Integer isMetering;

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

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