2024-02-23 19:50:43 +01:00
|
|
|
use diesel::prelude::*;
|
2024-04-14 21:46:58 +02:00
|
|
|
use serde::Serialize;
|
2024-02-23 19:50:43 +01:00
|
|
|
|
2024-02-28 23:18:43 +01:00
|
|
|
#[derive(Queryable, Selectable, Insertable, Serialize, Debug)]
|
2024-02-23 19:50:43 +01:00
|
|
|
#[diesel(table_name = crate::schema::services)]
|
|
|
|
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
|
|
|
|
pub struct Services {
|
|
|
|
pub url: String,
|
|
|
|
pub software: String,
|
2024-02-25 01:28:13 +01:00
|
|
|
pub server: String,
|
2024-02-26 18:18:20 +01:00
|
|
|
pub ipv6: String,
|
|
|
|
pub ipv4: String,
|
2024-02-28 23:18:43 +01:00
|
|
|
pub availability_ipv6: String,
|
|
|
|
pub availability_ipv4: String,
|
2024-04-20 20:09:48 +02:00
|
|
|
pub address_ipv6: String,
|
|
|
|
pub address_ipv4: String,
|
2024-02-23 19:50:43 +01:00
|
|
|
}
|
2024-02-26 17:36:51 +01:00
|
|
|
|
2024-02-28 23:18:43 +01:00
|
|
|
#[derive(Queryable, Selectable, Insertable, Serialize, Debug)]
|
2024-02-26 17:36:51 +01:00
|
|
|
#[diesel(table_name = crate::schema::scans)]
|
|
|
|
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
|
|
|
|
pub struct Scans {
|
|
|
|
pub id: Option<i32>,
|
|
|
|
pub installation: String,
|
|
|
|
pub timestamp: i64,
|
|
|
|
pub result_ipv6: String,
|
|
|
|
pub result_ipv4: String,
|
|
|
|
}
|