package com.sdtool.common.entity.base;

import com.sdtool.common.entity.site.ERPTokenUser;

import java.util.Date;

/**
 * Created by jlutt on 2020-08-11
 * 脚本处理对象，id参数
 * @author jlutt
 */
public class ProcessIdItem extends BaseEntity {

    private long id;

    private boolean readDetail;

    private ERPTokenUser currentUser;

    private String dataSourceId;

    private long supplierCode;

    public ProcessIdItem() {
    }


    private ProcessIdItem(Builder builder) {
        setCreateBy(builder.createBy);
        setCreateTime(builder.createTime);
        setCreateTimeLong(builder.createTimeLong);
        setUpdateBy(builder.updateBy);
        setUpdateTime(builder.updateTime);
        setUpdateTimeLong(builder.updateTimeLong);
        setId(builder.id);
        setReadDetail(builder.readDetail);
        setCurrentUser(builder.currentUser);
        setDataSourceId(builder.dataSourceId);
        setSupplierCode(builder.supplierCode);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public long getId() {
        return id;
    }

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

    public ERPTokenUser getCurrentUser() {
        return currentUser;
    }

    public void setCurrentUser(ERPTokenUser currentUser) {
        this.currentUser = currentUser;
    }

    public String getDataSourceId() {
        return dataSourceId;
    }

    public void setDataSourceId(String dataSourceId) {
        this.dataSourceId = dataSourceId;
    }

    public long getSupplierCode() {
        return supplierCode;
    }

    public void setSupplierCode(long supplierCode) {
        this.supplierCode = supplierCode;
    }

    public boolean isReadDetail() {
        return readDetail;
    }

    public void setReadDetail(boolean readDetail) {
        this.readDetail = readDetail;
    }

    public static final class Builder {
        private long createBy;
        private Date createTime;
        private long createTimeLong;
        private long updateBy;
        private Date updateTime;
        private long updateTimeLong;
        private long id;
        private boolean readDetail;
        private ERPTokenUser currentUser;
        private String dataSourceId;
        private long supplierCode;

        private Builder() {
        }

        public Builder createBy(long val) {
            createBy = val;
            return this;
        }

        public Builder createTime(Date val) {
            createTime = val;
            return this;
        }

        public Builder createTimeLong(long val) {
            createTimeLong = val;
            return this;
        }

        public Builder updateBy(long val) {
            updateBy = val;
            return this;
        }

        public Builder updateTime(Date val) {
            updateTime = val;
            return this;
        }

        public Builder updateTimeLong(long val) {
            updateTimeLong = val;
            return this;
        }

        public Builder id(long val) {
            id = val;
            return this;
        }

        public Builder readDetail(boolean val) {
            readDetail = val;
            return this;
        }

        public Builder currentUser(ERPTokenUser val) {
            currentUser = val;
            return this;
        }

        public Builder dataSourceId(String val) {
            dataSourceId = val;
            return this;
        }

        public Builder supplierCode(long val) {
            supplierCode = val;
            return this;
        }

        public ProcessIdItem build() {
            return new ProcessIdItem(this);
        }
    }
}
