package ink.wgink.pojo.result;

import java.util.ArrayList;
import java.util.List;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: SuccessResultLayImData
 * @Description: layim返回结果
 * @Author: wanggeng
 * @Date: 2021/1/15 10:08 上午
 * @Version: 1.0
 */
public class SuccessResultLayImData<T> extends SuccessResult {

    private static final long serialVersionUID = 4541100893920060211L;
    private Integer code;
    private String msg;
    private T data;

    public SuccessResultLayImData() {
    }

    public SuccessResultLayImData(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer 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;
    }

    public static class InitData {
        private User mine;
        private List<Friend> friend;
        private List<Group> group;

        public User getMine() {
            return mine;
        }

        public void setMine(User mine) {
            this.mine = mine;
        }

        public List<Friend> getFriend() {
            return friend;
        }

        public void setFriend(List<Friend> friend) {
            this.friend = friend;
        }

        public List<Group> getGroup() {
            return group;
        }

        public void setGroup(List<Group> group) {
            this.group = group;
        }

    }

    public static class User {
        private String username;
        private String id;
        private String status;
        private String sign;
        private String avatar;

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getSign() {
            return sign;
        }

        public void setSign(String sign) {
            this.sign = sign;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }

    }

    public static class Friend {
        private String groupname;
        private String id;
        private List<User> list;

        public String getGroupname() {
            return groupname;
        }

        public void setGroupname(String groupname) {
            this.groupname = groupname;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public List<User> getList() {
            return list;
        }

        public void setList(List<User> list) {
            this.list = list;
        }
    }

    public static class Group {
        private String groupname;
        private String id;
        private String avatar;

        public String getGroupname() {
            return groupname;
        }

        public void setGroupname(String groupname) {
            this.groupname = groupname;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getAvatar() {
            return avatar;
        }

        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }
    }

    public static class MemberData {
        private List<User> list;

        public List<User> getList() {
            return list == null ? new ArrayList<>() : list;
        }

        public void setList(List<User> list) {
            this.list = list;
        }
    }
}
