1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
use sqlx::{FromRow, types::ipnetwork::IpNetwork};
#[derive(Debug, FromRow, Clone)]
pub struct DbUser {
pub id: String,
pub email: String,
pub pref_name: String,
pub pw_hash: String,
pub last_login: chrono::NaiveDateTime
}
#[derive(Debug, FromRow, Clone)]
pub struct Peer {
pub id: String,
pub addr: IpNetwork,
pub public_key: String,
}
#[derive(Debug, FromRow, Clone)]
pub struct Network {
pub id: String,
pub subnet: IpNetwork,
pub description: Option<String>
}
|