package com.xinelu.manage.domain.appointmentorderprocessrecord;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 预约订单流程记录信息对象 appointment_order_process_record
 *
 * @author xinyilu
 * @date 2023-03-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "预约订单流程记录信息对象", description = "appointment_order_process_record")
public class AppointmentOrderProcessRecord extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 8063946072505273312L;

    /**
     * 主键id
     */
    private Long id;

    /**
     * 操作人id
     */
    @ApiModelProperty(value = "操作人id")
    @Excel(name = "操作人id")
    private Long operatePersonId;

    /**
     * 预约订单表id
     */
    @ApiModelProperty(value = "预约订单表id")
    @Excel(name = "预约订单表id")
    private Long appointmentOrderId;

    /**
     * 预约订单编号
     */
    @ApiModelProperty(value = "预约订单编号")
    @Excel(name = "预约订单编号")
    private String appointmentOrderNo;

    /**
     * 操作时间点
     */
    @ApiModelProperty(value = "操作时间点")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间点", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime operateTime;

    /**
     * 操作类型，PLACE_ORDER：下单，DISPATCH_ORDER：派单，RECEIVE_ORDER：接单，BACK_ORDER：退单，FINISH_ORDER：订单完成
     */
    @ApiModelProperty(value = "操作类型，PLACE_ORDER：下单，DISPATCH_ORDER：派单，RECEIVE_ORDER：接单，BACK_ORDER：退单，FINISH_ORDER：订单完成")
    @Excel(name = "操作类型，PLACE_ORDER：下单，DISPATCH_ORDER：派单，RECEIVE_ORDER：接单，BACK_ORDER：退单，FINISH_ORDER：订单完成")
    private String operateType;

    /**
     * 操作详情，文本内容，可存放退单原因等信息
     */
    @ApiModelProperty(value = "操作详情，文本内容，可存放退单原因等信息")
    @Excel(name = "操作详情，文本内容，可存放退单原因等信息")
    private String operateDetails;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("operatePersonId", getOperatePersonId())
                .append("appointmentOrderId", getAppointmentOrderId())
                .append("appointmentOrderNo", getAppointmentOrderNo())
                .append("operateTime", getOperateTime())
                .append("operateType", getOperateType())
                .append("operateDetails", getOperateDetails())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
