package com.gyz.examples.sb.webflux.repositories;

import com.gyz.examples.sb.webflux.model.UserDTO;
import org.springframework.stereotype.Repository;
import reactor.core.CoreSubscriber;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by YaZhou.Gu on 2018/1/16.
 */
@Repository
public class UserRepository {

    public Mono<UserDTO> getUserById(Long id) {
        return new Mono<UserDTO>() {
            @Override
            public void subscribe(CoreSubscriber<? super UserDTO> coreSubscriber) {

            }
        };
    }

    public Flux<UserDTO> getUsers() {
        return new Flux<UserDTO>() {
            @Override
            public void subscribe(CoreSubscriber<? super UserDTO> coreSubscriber) {

            }
        };
    }

}
