Hunter0x7c7
2023-08-11 198dd6e1b210758867eed417bf6e00ba733d47c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.github.hunter0x7c7.sync.model.data.result;
 
import com.google.gson.annotations.SerializedName;
 
import java.io.Serializable;
 
/**
 * ================================================================
 * <p>
 * 版    权: HunterHuang(c)2018
 * <p>
 * 作    者: Hunter_1125607007@QQ.COM
 * <p>
 * 版    本: V1.0
 * <p>
 * 创建日期: 2018/3/28 12:07
 * <p>
 * 描    述:回调信息统一封装类
 * <p>
 * <p>
 * 修订历史:
 * <p>
 * ================================================================
 */
public class ResultEntity<T> implements Serializable {
 
    // 判断code
    @SerializedName(value = "Code", alternate = {"code", "status", "errorCode"})
    private int code;
    // 提示信息
    @SerializedName(value = "Msg", alternate = {"msg", "message", "error", "errorMsg", "info"})
    private String msg;
    // 显示数据(用户需要关心的数据)
    @SerializedName(value = "Data", alternate = {"data", "Rows", "rows"})
    private T data;
 
    public int getCode() {
        return code;
    }
 
    public void setCode(int code) {
        this.code = code;
    }
 
    public String getMsg() {
        return msg;
    }
 
    public void setMsg(String msg) {
        this.msg = msg;
    }
 
    public T getData() {
        return data;
    }
 
    public void setData(T data) {
        this.data = data;
    }
 
    @Override
    public String toString() {
        return "ResultEntity{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}