Why can’t the rust module see the other module?

I’m writing a server in rust using Rocket and Sea-Orm.

This is my file structure of project:

src/
│ main.rs
│ mod.rs
│ setup.rs
│
├───entities/
│      mod.rs
│      prelude.rs
│      user.rs
|      ... other entities
│
├───routes/
│      mod.rs
│      user_route.rs

src/mod.rs file:

pub mod entities {
    pub mod User;
}

pub mod routes {
    pub mod user_route;
}

pub mod setup;

src/entities/mod.rs file:

pub mod prelude;

pub mod author;
pub mod book;
pub mod book_author;
pub mod book_genre;
pub mod book_rate;
pub mod chapter;
pub mod comment;
pub mod comment_rate;
pub mod genre;
pub mod user;

src/entities/prelude.rs file:

pub use super::author::Entity as Author;
pub use super::book::Entity as Book;
pub use super::book_author::Entity as BookAuthor;
pub use super::book_genre::Entity as BookGenre;
pub use super::book_rate::Entity as BookRate;
pub use super::chapter::Entity as Chapter;
pub use super::comment::Entity as Comment;
pub use super::comment_rate::Entity as CommentRate;
pub use super::genre::Entity as Genre;
pub use super::user::Entity as User;

src/routes/mod.rs file:

pub mod user_route;

src/entities/user.rs file:

use rocket::serde::{Deserialize, Serialize};
use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[sea_orm(table_name = "user")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    pub display_name: String,
    pub email: String,
    pub login: String,
    pub password: String,
    #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")]
    pub avatar: Vec<u8>,
    pub saved_books: Json,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(has_many = "super::book_rate::Entity")]
    BookRate,
    #[sea_orm(has_many = "super::comment::Entity")]
    Comment,
    #[sea_orm(has_many = "super::comment_rate::Entity")]
    CommentRate,
}

impl Related<super::book_rate::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::BookRate.def()
    }
}

impl Related<super::comment_rate::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::CommentRate.def()
    }
}

impl Related<super::book::Entity> for Entity {
    fn to() -> RelationDef {
        super::book_rate::Relation::Book.def()
    }
    fn via() -> Option<RelationDef> {
        Some(super::book_rate::Relation::User.def().rev())
    }
}

impl Related<super::comment::Entity> for Entity {
    fn to() -> RelationDef {
        super::comment_rate::Relation::Comment.def()
    }
    fn via() -> Option<RelationDef> {
        Some(super::comment_rate::Relation::User.def().rev())
    }
}

impl ActiveModelBehavior for ActiveModel {}

The problem is that the user_route.rs file does not see the user.rs model:

use rocket::serde::json::Json;
use rocket::State;

use crate::entities::user;

use sea_orm::DatabaseConnection;

#[get("/user")]
pub async fn get_all_users(db: &State<DatabaseConnection>) -> Json<Vec<user::Model>> {
    let users = User::find().all(db).await.unwrap();
    Json(users)
}

It gives the error “Unauthorized import of crate::entities. Could not find entities in the root of the box”

I don’t understand what exactly the error is, because everything seems to be indicated in the mod files

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật