package ba.unsa.etf.si.bbqms.admin_service.api;

import ba.unsa.etf.si.bbqms.domain.Advertisement;
import org.springframework.core.io.Resource;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface AdvertisementService {
    Advertisement create(String tenantCode,
                         MultipartFile file,
                         String title,
                         Integer durationSeconds,
                         Integer sortOrder,
                         Boolean active) throws Exception;

    List<Advertisement> listByTenant(String tenantCode);

    List<Advertisement> listActiveByTenant(String tenantCode);

    Advertisement update(String tenantCode,
                         long adId,
                         String title,
                         Integer durationSeconds,
                         Integer sortOrder,
                         Boolean active) throws Exception;

    void delete(String tenantCode, long adId) throws Exception;

    Advertisement getForTenant(String tenantCode, long adId);

    Advertisement findById(long adId);

    Resource loadMedia(long adId) throws Exception;
}
