chen.lin
2 天以前 9140aee230de0ef41de9682a9353fbd372e2bcaa
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
package com.vincent.rsf.openApi.entity.dto;
 
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
 
/**
 * 8.2.3 返回值 data 数据模型:执行结果 SUCCESS/FAIL
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "ResultData", description = "执行结果")
public class ResultData {
 
    @ApiModelProperty(value = "执行结果:SUCCESS 成功;FAIL 失败", example = "SUCCESS")
    private String result;
 
    public static final String SUCCESS = "SUCCESS";
    public static final String FAIL = "FAIL";
 
    public static ResultData success() {
        return new ResultData(SUCCESS);
    }
 
    public static ResultData fail() {
        return new ResultData(FAIL);
    }
}