package com.example.demo.notice;

import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeService {
    private final NoticeRepository noticeRepository;

    public NoticeService(NoticeRepository noticeRepository) {
        this.noticeRepository = noticeRepository;
    }

    public List<Notice> listActive(Long shopId) {
        return noticeRepository.findActiveNotices(shopId, NoticeStatus.PUBLISHED);
    }
}


