package com.willalp.canteen.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 订单进度记录对象 hs_order_process
 *
 * @author willalp
 * @date 2022-09-29
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HsOrderProcess extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private String id;
    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderNo;
    /**
     * 步骤，进程序号
     */
    @Excel(name = "步骤，进程序号")
    private Long processNum;
    /**
     * 当前进度状态
     */
    @Excel(name = "当前进度状态")
    private String processStatus;
    /**
     * 当前进度描述
     */
    @Excel(name = "当前进度描述")
    private String processDesc;
    /**
     * 进度触发时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "进度触发时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date processDate;
    /**
     * 用户系统编码
     */
    @Excel(name = "用户系统编码")
    private String userCode;
    /**
     * 是否删除（0.未删除；1.已删除）
     */
    private Integer isDelete;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderNo", getOrderNo())
                .append("processNum", getProcessNum())
                .append("processDesc", getProcessDesc())
                .append("processDate", getProcessDate())
                .append("userCode", getUserCode())
                .append("isDelete", getIsDelete())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
