package com.cool.store.request;

import com.cool.store.constants.CommonConstants;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author zhangchenbiao
 * @FileName: AuditOpenNewShopRequest
 * @Description:
 * @date 2024-05-09 17:28
 */
@Data
public class AuditOpenNewShopRequest {

    @NotNull
    @ApiModelProperty("记录id")
    private Long recordId;

    @NotNull
    @Min(1)@Max(2)
    @ApiModelProperty("审核状态 0待审核 1通过 2不通过")
    private Integer auditResult;

    @ApiModelProperty("店铺名称")
    private List<String> shopNameList;

    public boolean check(){
        if(CommonConstants.ONE == this.auditResult && CollectionUtils.isEmpty(this.shopNameList)){
            return false;
        }
        return true;
    }

}
