Flatten import for db-Schedule

This commit is contained in:
Tobias Reisinger 2023-11-23 13:39:18 +01:00
parent ee68405874
commit 452454f9e8
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 7 additions and 5 deletions

View file

@ -6,9 +6,11 @@ use std::str::FromStr;
use crate::db::errors::DatabaseError; use crate::db::errors::DatabaseError;
use crate::db::model_utils::Period; use crate::db::model_utils::Period;
use crate::db::schedules::{Periods, Schedule};
use crate::db::types::EmgauwaUid; use crate::db::types::EmgauwaUid;
// export for easier/flatter access
pub use crate::db::schedules::{Periods, Schedule};
pub(crate) mod errors; pub(crate) mod errors;
mod model_utils; mod model_utils;
mod models; mod models;

View file

@ -1,4 +1,4 @@
use crate::db::schedules::Periods; use crate::db::Periods;
use chrono::{NaiveTime, Timelike}; use chrono::{NaiveTime, Timelike};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use sqlx::database::HasArguments; use sqlx::database::HasArguments;

View file

@ -6,7 +6,7 @@ use sqlx::Sqlite;
use crate::db::errors::DatabaseError; use crate::db::errors::DatabaseError;
use crate::db::models::*; use crate::db::models::*;
use crate::db::schedules::Schedule; use crate::db::Schedule;
#[derive(Debug, Serialize, Clone)] #[derive(Debug, Serialize, Clone)]
pub struct Tag { pub struct Tag {

View file

@ -4,7 +4,7 @@ use sqlx::pool::PoolConnection;
use sqlx::{Pool, Sqlite}; use sqlx::{Pool, Sqlite};
use crate::db::errors::DatabaseError; use crate::db::errors::DatabaseError;
use crate::db::schedules::*; use crate::db::{Periods, Schedule};
use crate::db::tag::Tag; use crate::db::tag::Tag;
use crate::db::types::EmgauwaUid; use crate::db::types::EmgauwaUid;
use crate::handlers::errors::ApiError; use crate::handlers::errors::ApiError;

View file

@ -1,4 +1,4 @@
use crate::db::schedules::Schedule; use crate::db::Schedule;
use crate::handlers::errors::ApiError; use crate::handlers::errors::ApiError;
use actix::{Actor, StreamHandler}; use actix::{Actor, StreamHandler};
use actix_web::{get, web, HttpRequest, HttpResponse}; use actix_web::{get, web, HttpRequest, HttpResponse};