2021-07-08 05:47:11 +00:00
|
|
|
use flowy_derive::{Flowy_Event, ProtoBuf_Enum};
|
2021-08-30 14:44:17 +00:00
|
|
|
use strum_macros::Display;
|
2021-07-07 14:24:26 +00:00
|
|
|
|
2021-07-08 05:47:11 +00:00
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Display, Hash, ProtoBuf_Enum, Flowy_Event)]
|
2021-07-12 03:41:08 +00:00
|
|
|
#[event_err = "UserError"]
|
2021-07-07 14:24:26 +00:00
|
|
|
pub enum UserEvent {
|
2021-09-04 08:53:58 +00:00
|
|
|
#[event(output = "UserProfile")]
|
2021-08-31 15:01:46 +00:00
|
|
|
GetUserProfile = 0,
|
2021-08-30 14:44:17 +00:00
|
|
|
|
2021-09-04 08:53:58 +00:00
|
|
|
#[event(input = "SignInRequest", output = "UserProfile")]
|
2021-08-31 15:01:46 +00:00
|
|
|
SignIn = 1,
|
2021-08-30 14:44:17 +00:00
|
|
|
|
2021-09-04 08:53:58 +00:00
|
|
|
#[event(input = "SignUpRequest", output = "UserProfile")]
|
2021-08-31 15:01:46 +00:00
|
|
|
SignUp = 2,
|
2021-08-30 14:44:17 +00:00
|
|
|
|
2021-07-12 03:41:08 +00:00
|
|
|
#[event(passthrough)]
|
2021-08-31 15:01:46 +00:00
|
|
|
SignOut = 3,
|
2021-08-30 14:44:17 +00:00
|
|
|
|
2021-08-31 15:01:46 +00:00
|
|
|
#[event(input = "UpdateUserRequest")]
|
|
|
|
UpdateUser = 4,
|
2021-07-07 14:24:26 +00:00
|
|
|
}
|