package com.izouma.nineth.service;

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

@Service
@AllArgsConstructor
public class AppVersionService {

    private AppVersionRepo appVersionRepo;

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