Add new tables, add automatic data cleanup with configurable duration, move company business logic into seperate folder
This commit is contained in:
@@ -1,28 +1,65 @@
|
||||
// Written manually because diesel cant fucking read the db properly for some reason
|
||||
// @generated automatically by Diesel CLI.
|
||||
|
||||
diesel::table! {
|
||||
antennas (id) {
|
||||
id -> Int8,
|
||||
id -> Bigint,
|
||||
name -> Text,
|
||||
ip -> Text,
|
||||
#[max_length = 15]
|
||||
ip -> Varchar,
|
||||
error -> Nullable<Text>,
|
||||
last_error_t -> Nullable<Timestamp>,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
client_readings (id) {
|
||||
id -> Int8,
|
||||
ip -> Text,
|
||||
mac -> Text,
|
||||
antenna_ip -> Text,
|
||||
db_reading -> Int4,
|
||||
id -> Bigint,
|
||||
#[max_length = 15]
|
||||
ip -> Nullable<Varchar>,
|
||||
#[max_length = 17]
|
||||
mac -> Varchar,
|
||||
#[max_length = 15]
|
||||
antenna_ip -> Varchar,
|
||||
read_at -> Timestamp,
|
||||
tx_ccq -> Int4,
|
||||
rx_ccq -> Int4,
|
||||
radio_name -> Varchar,
|
||||
tx_rate -> Varchar,
|
||||
rx_rate -> Varchar,
|
||||
db_reading -> Integer,
|
||||
tx_ccq -> Nullable<Integer>,
|
||||
rx_ccq -> Nullable<Integer>,
|
||||
#[max_length = 255]
|
||||
radio_name -> Nullable<Varchar>,
|
||||
#[max_length = 50]
|
||||
tx_rate -> Nullable<Varchar>,
|
||||
#[max_length = 50]
|
||||
rx_rate -> Nullable<Varchar>,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::allow_tables_to_appear_in_same_query!(antennas, client_readings,);
|
||||
diesel::table! {
|
||||
client_statistics (id) {
|
||||
id -> Bigint,
|
||||
#[max_length = 15]
|
||||
ip -> Nullable<Varchar>,
|
||||
#[max_length = 17]
|
||||
mac -> Varchar,
|
||||
#[max_length = 15]
|
||||
antenna_ip -> Varchar,
|
||||
read_at -> Timestamp,
|
||||
db_reading -> Integer,
|
||||
tx_ccq -> Nullable<Integer>,
|
||||
rx_ccq -> Nullable<Integer>,
|
||||
#[max_length = 255]
|
||||
radio_name -> Nullable<Varchar>,
|
||||
#[max_length = 50]
|
||||
tx_rate -> Nullable<Varchar>,
|
||||
#[max_length = 50]
|
||||
rx_rate -> Nullable<Varchar>,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
wara (id) {
|
||||
id -> Bigint,
|
||||
last_client_reading_cleanup -> Nullable<Timestamp>,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::allow_tables_to_appear_in_same_query!(antennas, client_readings, client_statistics, wara,);
|
||||
|
||||
Reference in New Issue
Block a user