package com.zm.order.tool.server.dto;

import com.alibaba.fastjson.JSON;
import com.zm.order.tool.server.model.Operation;

import java.util.Map;

/**
 * @Description 退款单操作DTO
 * @Author: ph
 * @Date: 2019/11/4 11:20
 */
public class RefundOperateDTO {

    /**
     * 退款单号
     */
    private String refundNo;

    /**
     * 操作类型
     */
    private String operation;

    /**
     * 角色
     */
    private Integer role;

    /**
     * 操作人
     */
    private Long operator;

    /**
     * 扩展信息
     */
    private Map<String, Object> operateInfo;

    /**
     * 操作
     *
     * @return
     */
    public Operation operation() {
        Operation operation = new Operation();
        operation.setRole(role);
        operation.setOperation(this.operation);
        operation.setOperator(operator);
        return operation;
    }

    public String getRefundNo() {
        return refundNo;
    }

    public void setRefundNo(String refundNo) {
        this.refundNo = refundNo;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public Long getOperator() {
        return operator;
    }

    public void setOperator(Long operator) {
        this.operator = operator;
    }

    public Map<String, Object> getOperateInfo() {
        return operateInfo;
    }

    public void setOperateInfo(Map<String, Object> operateInfo) {
        this.operateInfo = operateInfo;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
