refactor: organize type definitions into dedicated db/types/ directory
- Move type files to src/db/types/: currency_type, listing_id, user_id, money_amount, telegram_user_id - Create types/mod.rs with proper re-exports for all type modules - Update db/mod.rs to import from new types module instead of individual files - All tests pass - no functionality changes - Improves code organization by clearly separating types, DAOs, and models
This commit is contained in:
@@ -10,6 +10,7 @@ sqlx = { version = "0.8.6", features = [
|
||||
"runtime-tokio-rustls",
|
||||
"sqlite",
|
||||
"chrono",
|
||||
"macros",
|
||||
"rust_decimal",
|
||||
] }
|
||||
rust_decimal = { version = "1.33", features = ["serde"] }
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
pub mod currency_type;
|
||||
pub mod dao;
|
||||
pub mod listing_id;
|
||||
pub mod models;
|
||||
pub mod money_amount;
|
||||
pub mod telegram_user_id;
|
||||
pub mod user_id;
|
||||
pub mod types;
|
||||
|
||||
// Re-export all models for easy access
|
||||
pub use currency_type::*;
|
||||
// Re-export all modules for easy access
|
||||
pub use dao::*;
|
||||
pub use listing_id::*;
|
||||
pub use models::*;
|
||||
pub use money_amount::*;
|
||||
pub use telegram_user_id::*;
|
||||
pub use user_id::*;
|
||||
pub use types::*;
|
||||
|
||||
12
src/db/types/mod.rs
Normal file
12
src/db/types/mod.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
pub mod currency_type;
|
||||
pub mod listing_id;
|
||||
pub mod money_amount;
|
||||
pub mod telegram_user_id;
|
||||
pub mod user_id;
|
||||
|
||||
// Re-export all types for easy access
|
||||
pub use currency_type::*;
|
||||
pub use listing_id::*;
|
||||
pub use money_amount::*;
|
||||
pub use telegram_user_id::*;
|
||||
pub use user_id::*;
|
||||
Reference in New Issue
Block a user