package com.izouma.nineth.service;

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

@Service
@AllArgsConstructor
public class MetaPlayerWearService {

    private MetaPlayerWearRepo metaPlayerWearRepo;

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