package com.xisc.pm.app.service.autoboard.dto;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Id;

import org.springframework.data.mongodb.core.mapping.Document;

import cn.hutool.core.util.IdUtil;

/**
 * 组板日志
 * 
 * @author jun.zeng
 *
 */
@Document(collection = "PmAutoPdLog")
public class PmAutoPdLog implements Serializable {

    private static final long serialVersionUID = 2905300642193390852L;

    public PmAutoPdLog(Long requestId, int version , String moldId) {
        this.version = version;
        this.requestId = requestId;
        this.setMoldId(moldId) ;
        this.id = IdUtil.getSnowflakeNextId();
    }

    @Id
    private Long id;

    private Long requestId;
    
    private String moldId;

    private int version;

    private String axisOrderNo;

    private String formPlateMode;

    private List<String> block1;

    private List<String> block2;

    private List<BigDecimal> lens;

    private String message;

    private BigDecimal yield;

    /**
     * @return the requestId
     */
    public Long getRequestId() {
        return requestId;
    }

    /**
     * @param requestId the requestId to set
     */
    public PmAutoPdLog setRequestId(Long requestId) {
        this.requestId = requestId;
        return this;
    }

    /**
     * @return the axisOrderNo
     */
    public String getAxisOrderNo() {
        return axisOrderNo;
    }

    /**
     * @param axisOrderNo the axisOrderNo to set
     */
    public PmAutoPdLog setAxisOrderNo(String axisOrderNo) {
        this.axisOrderNo = axisOrderNo;
        return this;
    }

    /**
     * @return the formPlateMode
     */
    public String getFormPlateMode() {
        return formPlateMode;
    }

    /**
     * @param formPlateMode the formPlateMode to set
     */
    public PmAutoPdLog setFormPlateMode(String formPlateMode) {
        this.formPlateMode = formPlateMode;
        return this;
    }

    /**
     * @return the block1
     */
    public List<String> getBlock1() {
        return block1;
    }

    /**
     * @param block1 the block1 to set
     */
    public PmAutoPdLog setBlock1(List<String> block1) {
        if(block1 != null) {
            this.block1 = new ArrayList<String>(block1);
        }
        return this;
    }

    /**
     * @return the block2
     */
    public List<String> getBlock2() {
        return block2;
    }

    /**
     * @param block2 the block2 to set
     */
    public PmAutoPdLog setBlock2(List<String> block2) {
        if(block2 != null) {
            this.block2 = new ArrayList<String>(block2);
        }
        return this;
    }

    /**
     * @return the lens
     */
    public List<BigDecimal> getLens() {
        return lens;
    }

    /**
     * @param lens the lens to set
     */
    public PmAutoPdLog setLens(List<BigDecimal> lens) {
        if(lens != null) {
            this.lens = new ArrayList<BigDecimal>(lens);
        }
        return this;
    }

    /**
     * @return the message
     */
    public String getMessage() {
        return message;
    }

    /**
     * @param message the message to set
     */
    public PmAutoPdLog setMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * @return the yield
     */
    public BigDecimal getYield() {
        return yield;
    }

    /**
     * @param yield the yield to set
     */
    public PmAutoPdLog setYield(BigDecimal yield) {
        this.yield = yield;
        return this;
    }

    public int getVersion() {
        return version;
    }

    public PmAutoPdLog setVersion(int version) {
        this.version = version;
        return this;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMoldId() {
        return moldId;
    }

    public void setMoldId(String moldId) {
        this.moldId = moldId;
    }

}
