package com.izouma.nineth.service;

import com.izouma.nineth.domain.MintActivity;
import com.izouma.nineth.dto.PageQuery;
import com.izouma.nineth.repo.MintActivityRepo;
import com.izouma.nineth.utils.JpaUtils;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class MintActivityService {

    private MintActivityRepo mintActivityRepo;

    public Page<MintActivity> all(PageQuery pageQuery) {
        return mintActivityRepo.findAll(JpaUtils.toSpecification(pageQuery, MintActivity.class), JpaUtils.toPageRequest(pageQuery));
    }
}
