aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/service/component/SubscribeEvent.java
blob: 9b644f2f42978fbc85ebf1db5cf3d1ad7077108e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.juick.service.component;

import com.juick.User;
import org.springframework.context.ApplicationEvent;

public class SubscribeEvent extends ApplicationEvent {
    private User user;
    private User toUser;
    /**
     * Create a new ApplicationEvent.
     *
     * @param source the object on which the event initially occurred (never {@code null})
     */
    public SubscribeEvent(Object source, User user, User toUser) {
        super(source);
        this.user = user;
        this.toUser = toUser;
    }

    public User getUser() {
        return user;
    }

    public User getToUser() {
        return toUser;
    }
}