package com.cool.store.request;

import com.cool.store.enums.AuditStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.Objects;

/**
 * @author zhangchenbiao
 * @FileName: PointAuditRequest
 * @Description:
 * @date 2024-04-03 14:13
 */
@Data
public class PointAuditRequest {

    @ApiModelProperty("铺位id")
    private Long pointId;

    @ApiModelProperty("1通过,2拒绝")
    private Integer auditStatus;

    @ApiModelProperty("原因")
    private String reason;

    public boolean check(){
        if(Objects.isNull(this.pointId)){
            return false;
        }
        if(Objects.isNull(this.auditStatus)){
            return false;
        }
        if(AuditStatusEnum.REJECT.equals(this.auditStatus) && StringUtils.isBlank(this.reason)){
            return false;
        }
        return true;
    }


}
