hacky-ruadat/src/lib.rs

41 lines
1.0 KiB
Rust
Raw Normal View History

2024-02-21 14:46:17 +01:00
#![allow(clippy::blocks_in_conditions)]
2023-04-03 16:11:26 +02:00
pub mod model;
2023-06-28 14:06:28 +02:00
#[cfg(feature = "rowing-tera")]
pub mod tera;
2023-04-03 22:03:45 +02:00
2023-07-16 19:16:42 +02:00
#[cfg(feature = "rest")]
pub mod rest;
2024-04-30 11:59:33 +02:00
pub mod scheduled;
2024-09-03 21:35:43 +03:00
pub(crate) const AMOUNT_DAYS_TO_SHOW_TRIPS_AHEAD: i64 = 10;
pub(crate) const RENNRUDERBEITRAG: i32 = 11000;
pub(crate) const BOAT_STORAGE: i32 = 4500;
pub(crate) const FAMILY_TWO: i32 = 30000;
pub(crate) const FAMILY_THREE_OR_MORE: i32 = 35000;
pub(crate) const STUDENT_OR_PUPIL: i32 = 8000;
pub(crate) const REGULAR: i32 = 22000;
pub(crate) const UNTERSTUETZEND: i32 = 2500;
pub(crate) const FOERDERND: i32 = 8500;
pub(crate) const SCHECKBUCH: i32 = 3000;
pub(crate) const EINSCHREIBGEBUEHR: i32 = 3000;
2023-04-03 22:03:45 +02:00
#[cfg(test)]
#[macro_export]
macro_rules! testdb {
() => {{
let pool = SqlitePool::connect(":memory:").await.unwrap();
sqlx::query_file!("./migration.sql")
.execute(&pool)
.await
.unwrap();
sqlx::query_file!("./seeds.sql")
.execute(&pool)
.await
.unwrap();
pool
}};
}