Message.java 794 Bytes
package com.viontech.integration.jiaoguansuo.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * .
 *
 * @author 谢明辉
 * @date 2022/2/21
 */

@Getter
@Setter
public class Message {

    private String message;
    private Integer code;
    private List<VideoEntity> videos;

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

    public Message() {
    }

    public static Message error(String msg) {
        return new Message(msg, 0);
    }

    public static Message success(String msg) {
        return new Message(msg, 1);
    }

    public static Message success() {
        return success("success");
    }

    public static Message error() {
        return error("error");
    }
}