package com.fizz.business.form;


import com.fizz.business.constants.enums.WebOperateMatEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 状态变更form
 *
 * @author chenhao
 * @date 2023/04/27
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WebOperateMatForm extends OperateMatForm implements Serializable {

    @NotNull(message = "操作不存在")
    @Schema(description = "ONLINE-钢卷上线，UNLOAD-手动卸卷，ALL_RETURN-整卷回退，HALF_RETURN-半卷回退，BLOCK-卸卷并封闭，THROW_TAIL-甩尾")
    private WebOperateMatEnum operation;

    @Schema(description = "回退卷号")
    private String returnMatId;

    @Schema(description = "回退重量")
    private Double returnWeight;

    @Schema(description = "回退备注")
    private String returnRemark;

    @Schema(description = "产出钢卷长度")
    private Double coilLength;

    @Builder
    public WebOperateMatForm(Integer porIdx, Integer trIdx, String planId, String entryMatId, String planNo, WebOperateMatEnum operation, Double returnWeight, String returnRemark) {
        super(porIdx, trIdx, planId, entryMatId, planNo);
        this.operation = operation;
        this.returnWeight = returnWeight;
        this.returnRemark = returnRemark;
    }
}
