package com.casic.missiles.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @Description: for return
 * @Author: wangpeng
 * @Date: 2022/11/27 00:51
 */
@Data
@ApiModel
public class ReturnDTO<T> implements Serializable {
    @ApiModelProperty(value = "返回码", dataType = "String")
    private Integer code;
    @ApiModelProperty(value = "提示信息", dataType = "String")
    private String message;
    @ApiModelProperty(value = "返回值", dataType = "Object")
    private T data;

    public ReturnDTO(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ReturnDTO(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public ReturnDTO() {
    }
}