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-07-21 17:32:49
 */
@ApiModel(value = "TenantEntryRecordWrapper对象", description = "机构入驻审核记录查询对象")
public class TenantEntryRecordWrapper {

    @Data
	@Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(" TenantEntryRecordQuery-机构入驻审核记录")
    public static class TenantEntryRecordQuery 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 TenantEntryRecordQuery from(String json) {
            return JSON.parseObject(json, TenantEntryRecordQuery.class);
        }
    }  

	@ApiModel(" TenantEntryRecord-机构入驻审核记录")
    public static class TenantEntryRecord {
        
        public String jsonString() {
            return JSON.toJSONString(this);
        }

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

}