package com.njcn.msgpush.module.push.checker;

import com.njcn.msgpush.module.push.checker.impl.BlacklistChecker;
import com.njcn.msgpush.module.push.checker.impl.QuotaChecker;
import com.njcn.msgpush.module.push.checker.impl.RateLimitChecker;
import com.njcn.msgpush.module.push.dal.dataobject.message.MessageRecordDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author caozehui
 * @data 2026-02-28
 * @description 检查链
 */
@Component
public class MsgPushGuardChain {
    @Autowired
    private BlacklistChecker blacklistChecker;
    @Autowired
    private QuotaChecker quotaChecker;
    @Autowired
    private RateLimitChecker rateLimitChecker;


    public void checkAll(List<MessageRecordDO> messageRecordList) {
        blacklistChecker.check(messageRecordList);
        quotaChecker.check(messageRecordList);
        rateLimitChecker.check(messageRecordList);
    }
}
