mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
29 lines
591 B
Rust
29 lines
591 B
Rust
use flowy_database::schema::user_table;
|
|
use flowy_derive::ProtoBuf;
|
|
|
|
#[derive(ProtoBuf, Clone, Default, Queryable, Identifiable, Insertable)]
|
|
#[table_name = "user_table"]
|
|
pub struct User {
|
|
#[pb(index = 1)]
|
|
pub(crate) id: String,
|
|
|
|
#[pb(index = 2)]
|
|
pub(crate) name: String,
|
|
|
|
#[pb(index = 3)]
|
|
pub(crate) email: String,
|
|
|
|
#[pb(index = 4)]
|
|
password: String,
|
|
}
|
|
|
|
impl User {
|
|
pub fn new(id: String, name: String, email: String, password: String) -> Self {
|
|
Self {
|
|
id,
|
|
name,
|
|
email,
|
|
password,
|
|
}
|
|
}
|
|
}
|