package com.fzm.mall.server.admin.order.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 用户提货表-提货操作记录
 * </p>
 *
 * @author wulixian
 * @since 2021-03-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_delivery_log")
@ApiModel(value = "DeliveryLog对象", description = "用户提货表-提货操作记录")
public class DeliveryLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 提货单发货
     */
    public static final String DELIVERY_SENDED = "提货单发货";

    /**
     * 退货审核不通过
     */
    public static final String DELIVERY_EXAMINE_FAILED = "退货审核不通过";

    /**
     * 退货审核通过
     */
    public static final String DELIVERY_EXAMINE_SUCCESS = "退货审核通过";

    /**
     * 退货签收审核不通过
     */
    public static final String DELIVERY_RETURN_RECEIPT_EXAMINE_FAILED = "退货签收审核不通过";

    /**
     * 退货签收审核通过
     */
    public static final String DELIVERY_RETURN_RECEIPT_EXAMINE_SUCCESS = "退货签收审核通过";

    @ApiModelProperty(value = "主键自增编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "提货订单编号")
    private String orderDeliveryId;

    @ApiModelProperty(value = "提货状态，0->待发货，1->已发货，2->已收货，3->已撤销，4->待退货，5->已退货")
    private Integer deliveryState;

    @ApiModelProperty(value = "操作信息")
    private String operation;

    @ApiModelProperty(value = "用户编号")
    private String uid;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户名称")
    private String uName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "更改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    public DeliveryLog() {
    }

    public DeliveryLog(String orderDeliveryId, Integer deliveryState, String operation, String uid, String remark) {
        this.orderDeliveryId = orderDeliveryId;
        this.deliveryState = deliveryState;
        this.operation = operation;
        this.uid = uid;
        this.remark = remark;
    }
}
