-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(users): migrate proto backend to native
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pub mod ops; | ||
pub mod types; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#[derive(Clone, PartialEq)] | ||
pub struct Email { | ||
pub email: String, | ||
} | ||
|
||
#[derive(Clone, PartialEq)] | ||
pub struct DefaultUser {} | ||
|
||
#[derive(Clone, PartialEq)] | ||
pub enum Kind { | ||
Email(Email), | ||
DefaultUser(DefaultUser), | ||
} | ||
|
||
#[derive(Clone, PartialEq)] | ||
pub struct Identity { | ||
pub kind: Kind | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use chirp_workflow::prelude::*; | ||
use rivet_operation::prelude::{proto}; | ||
use proto::backend; | ||
|
||
pub mod identity; | ||
|
||
#[derive(Debug, Default)] | ||
pub struct User { | ||
pub user_id: Uuid, | ||
pub display_name: String, | ||
pub account_number: i64, | ||
pub avatar_id: String, | ||
pub profile_upload_id: Option<Uuid>, | ||
pub profile_file_name: Option<String>, | ||
pub profile_provider: Option<backend::upload::Provider>, | ||
pub join_ts: i64, | ||
pub bio: String, | ||
pub is_admin: bool, | ||
pub delete_request_ts: Option<i64>, | ||
pub delete_complete_ts: Option<i64>, | ||
} |