package com.izouma.jiashanxia.service;

import com.izouma.jiashanxia.domain.UserSetFlow;
import com.izouma.jiashanxia.dto.PageQuery;
import com.izouma.jiashanxia.repo.UserSetFlowRepo;
import com.izouma.jiashanxia.utils.JpaUtils;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class UserSetFlowService {

    private UserSetFlowRepo userSetFlowRepo;

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