Skip to content

Commit 20d844f

Browse files
committed
chore(users): migrate proto backend to native
1 parent 6fb3d05 commit 20d844f

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

packages/services/user/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pub mod ops;
2+
pub mod types;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#[derive(Clone, PartialEq)]
2+
pub struct Email {
3+
pub email: String,
4+
}
5+
6+
#[derive(Clone, PartialEq)]
7+
pub struct DefaultUser {}
8+
9+
#[derive(Clone, PartialEq)]
10+
pub enum Kind {
11+
Email(Email),
12+
DefaultUser(DefaultUser),
13+
}
14+
15+
#[derive(Clone, PartialEq)]
16+
pub struct Identity {
17+
pub kind: Kind
18+
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use chirp_workflow::prelude::*;
2+
use rivet_operation::prelude::{proto};
3+
use proto::backend;
4+
5+
pub mod identity;
6+
7+
#[derive(Debug, Default)]
8+
pub struct User {
9+
pub user_id: Uuid,
10+
pub display_name: String,
11+
pub account_number: i64,
12+
pub avatar_id: String,
13+
pub profile_upload_id: Option<Uuid>,
14+
pub profile_file_name: Option<String>,
15+
pub profile_provider: Option<backend::upload::Provider>,
16+
pub join_ts: i64,
17+
pub bio: String,
18+
pub is_admin: bool,
19+
pub delete_request_ts: Option<i64>,
20+
pub delete_complete_ts: Option<i64>,
21+
}

0 commit comments

Comments
 (0)