summaryrefslogtreecommitdiff
path: root/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db.rs b/src/db.rs
index 489a000..47e907d 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -1,13 +1,13 @@
1use serde::Serialize; 1use serde::Serialize;
2use sqlx::{PgPool, postgres::PgPoolOptions}; 2use sqlx::{PgPool, postgres::PgPoolOptions, types::{ipnetwork::IpNetwork, mac_address::MacAddress}};
3use tracing::{debug, info}; 3use tracing::{debug, info};
4 4
5#[derive(Serialize, Debug)] 5#[derive(Serialize, Debug)]
6pub struct Device { 6pub struct Device {
7 pub id: String, 7 pub id: String,
8 pub mac: String, 8 pub mac: MacAddress,
9 pub broadcast_addr: String, 9 pub broadcast_addr: String,
10 pub ip: String, 10 pub ip: IpNetwork,
11 pub times: Option<Vec<i64>> 11 pub times: Option<Vec<i64>>
12} 12}
13 13