package com.ruoyi.jarvis.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 批量发品任务对象 batch_publish_task
 * 
 * @author ruoyi
 * @date 2025-01-10
 */
public class BatchPublishTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 任务ID */
    private Long id;

    /** 任务名称 */
    @Excel(name = "任务名称")
    private String taskName;

    /** 原始线报消息 */
    @Excel(name = "原始线报消息")
    private String originalMessage;

    /** 解析出的商品数量 */
    @Excel(name = "解析商品数量")
    private Integer totalProducts;

    /** 选中的商品数量 */
    @Excel(name = "选中商品数量")
    private Integer selectedProducts;

    /** 目标ERP账号（JSON数组） */
    @Excel(name = "目标账号")
    private String targetAccounts;

    /** 任务状态：0待处理 1处理中 2已完成 3失败 */
    @Excel(name = "任务状态", readConverterExp = "0=待处理,1=处理中,2=已完成,3=失败")
    private Integer status;

    /** 成功发品数量 */
    @Excel(name = "成功数量")
    private Integer successCount;

    /** 失败发品数量 */
    @Excel(name = "失败数量")
    private Integer failCount;

    /** 通用参数（JSON） */
    private String commonParams;

    /** 创建人ID */
    private Long createUserId;

    /** 创建人姓名 */
    @Excel(name = "创建人")
    private String createUserName;

    /** 完成时间 */
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date completeTime;

    public Long getId() {
        return id;
    }

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

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getOriginalMessage() {
        return originalMessage;
    }

    public void setOriginalMessage(String originalMessage) {
        this.originalMessage = originalMessage;
    }

    public Integer getTotalProducts() {
        return totalProducts;
    }

    public void setTotalProducts(Integer totalProducts) {
        this.totalProducts = totalProducts;
    }

    public Integer getSelectedProducts() {
        return selectedProducts;
    }

    public void setSelectedProducts(Integer selectedProducts) {
        this.selectedProducts = selectedProducts;
    }

    public String getTargetAccounts() {
        return targetAccounts;
    }

    public void setTargetAccounts(String targetAccounts) {
        this.targetAccounts = targetAccounts;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getSuccessCount() {
        return successCount;
    }

    public void setSuccessCount(Integer successCount) {
        this.successCount = successCount;
    }

    public Integer getFailCount() {
        return failCount;
    }

    public void setFailCount(Integer failCount) {
        this.failCount = failCount;
    }

    public String getCommonParams() {
        return commonParams;
    }

    public void setCommonParams(String commonParams) {
        this.commonParams = commonParams;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("taskName", getTaskName())
            .append("originalMessage", getOriginalMessage())
            .append("totalProducts", getTotalProducts())
            .append("selectedProducts", getSelectedProducts())
            .append("targetAccounts", getTargetAccounts())
            .append("status", getStatus())
            .append("successCount", getSuccessCount())
            .append("failCount", getFailCount())
            .append("commonParams", getCommonParams())
            .append("createUserId", getCreateUserId())
            .append("createUserName", getCreateUserName())
            .append("createTime", getCreateTime())
            .append("completeTime", getCompleteTime())
            .toString();
    }
}

