blob: c9aaf51de3296551983243021fdeabce5a787199 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
pub struct User {
id: i64,
email: String,
username: String,
password_hash: String,
}
impl User {
pub(super) fn new(id: i64, email: String, username: String, password_hash: String) -> Self {
Self { id, email, username, password_hash }
}
pub fn id(&self) -> i64 { self.id }
pub fn email(&self) -> &str { &self.email }
pub fn username(&self) -> &str { &self.username }
pub fn password_hash(&self) -> &str { &self.password_hash }
}
|