package com.yonge.cooleshow.biz.dal.wrapper;

import com.alibaba.fastjson.JSON;
import com.microsvc.toolkit.common.response.paging.QueryInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Optional;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

/**
 * 网络教室成员状态表
 * 2023-08-14 15:51:26
 */
@ApiModel(value = "ImNetworkRoomMemberStatusWrapper对象", description = "网络教室成员状态表查询对象")
public class ImNetworkRoomMemberStatusWrapper {

    @Data
	@Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(" ImNetworkRoomMemberStatusQuery-网络教室成员状态表")
    public static class ImNetworkRoomMemberStatusQuery implements QueryInfo {
    
    	@ApiModelProperty("当前页")
        private Integer page;
        
        @ApiModelProperty("分页行数")
        private Integer rows;
        
        @ApiModelProperty("关键字匹配")
		private String keyword;
        
        public String getKeyword() {
            return Optional.ofNullable(keyword).filter(StringUtils::isNotBlank).orElse(null);
        }
        
        public String jsonString() {
            return JSON.toJSONString(this);
        }

        public static ImNetworkRoomMemberStatusQuery from(String json) {
            return JSON.parseObject(json, ImNetworkRoomMemberStatusQuery.class);
        }
    }  

	@ApiModel(" ImNetworkRoomMemberStatus-网络教室成员状态表")
    public static class ImNetworkRoomMemberStatus {
        
        public String jsonString() {
            return JSON.toJSONString(this);
        }

        public static ImNetworkRoomMemberStatus from(String json) {
            return JSON.parseObject(json, ImNetworkRoomMemberStatus.class);
        }
	}

}