diff options
Diffstat (limited to 'src/main/java/com/juick/service/component/SubscribeEvent.java')
-rw-r--r-- | src/main/java/com/juick/service/component/SubscribeEvent.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/component/SubscribeEvent.java b/src/main/java/com/juick/service/component/SubscribeEvent.java new file mode 100644 index 00000000..9b644f2f --- /dev/null +++ b/src/main/java/com/juick/service/component/SubscribeEvent.java @@ -0,0 +1,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; + } +} |