package cn.reghao.bnt.web.devops.aliyun.service;

import cn.reghao.bnt.web.devops.aliyun.db.repository.AliyunAccountRepository;
import cn.reghao.bnt.web.devops.aliyun.model.po.AliyunAccount;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * @author reghao
 * @date 2025-09-29 15:23:19
 */
@Service
public class AliyunAccountService {
    private final AliyunAccountRepository aliyunAccountRepository;

    public AliyunAccountService(AliyunAccountRepository aliyunAccountRepository) {
        this.aliyunAccountRepository = aliyunAccountRepository;
    }

    public Page<AliyunAccount> getAliyunAccounts() {
        PageRequest pageRequest = PageRequest.of(0, 100);
        return aliyunAccountRepository.findAll(pageRequest);
    }
}
