package com.example.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.domain.Wallets;
import com.example.repository.WalletsRepository;

//ユーザウォレットのサービス
@Service
public class WalletsService {
	@Autowired
	WalletsRepository walletsRepository;
	
	public List<Wallets> findAll(){
		return walletsRepository.findAll();
	}
	
	public Wallets findOne(Integer id){
		return walletsRepository.findOne(id);
	}
	
	public Wallets create(Wallets wallet){
		return walletsRepository.save(wallet);
	}
	
	public Wallets update(Wallets wallet){
		return walletsRepository.save(wallet);
	}
}
