package com.microservices.zone.member.domain.vo;

import com.microservices.common.core.utils.StringUtils;
import com.microservices.common.core.web.domain.BaseEntity;
import com.microservices.zone.utils.ZoneConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author otto
 */

@Data
@ApiModel("专区待审核会员查询对象")
public class ZoneMemberAuditSearchVo extends BaseEntity {
    @ApiModelProperty(value = "专区标识")
    private Long zoneId;
    @ApiModelProperty(value = "用户名")
    private String username;
    @ApiModelProperty(value = "会员名称")
    private String name;
    @ApiModelProperty(value = "审核状态（默认为0，待审核）")
    private String isAudit;

    public ZoneMemberSearchVo toZoneMemberSearchVo(){
        ZoneMemberSearchVo zoneMemberSearchVo=new ZoneMemberSearchVo();
        zoneMemberSearchVo.setZoneId(zoneId);
        zoneMemberSearchVo.setUsername(username);
        zoneMemberSearchVo.setName(name);
        if(StringUtils.isEmpty(isAudit)){
            zoneMemberSearchVo.setIsAudit(ZoneConstants.MEMBER_NOT_AUDIT);
        }else{
            zoneMemberSearchVo.setIsAudit(isAudit);
        }
        return zoneMemberSearchVo;
    }
}
