//! Auto-generated by Prax - DO NOT EDIT
//!
//! This module contains the generated Prax client.

pub mod types;
pub mod filters;

pub mod user;
pub mod post;
pub mod comment;
pub mod role;
pub mod post_status;

pub use types::*;
pub use filters::*;

pub use user::User;
pub use post::Post;
pub use comment::Comment;
pub use role::Role;
pub use post_status::PostStatus;

/// The Prax database client
pub struct PraxClient<E: prax_query::QueryEngine> {
    engine: E,
}

impl<E: prax_query::QueryEngine> PraxClient<E> {
    /// Create a new Prax client with the given query engine
    pub fn new(engine: E) -> Self {
        Self { engine }
    }

    /// Access User operations
    pub fn user(&self) -> user::UserOperations<E> {
        user::UserOperations::new(&self.engine)
    }

    /// Access Post operations
    pub fn post(&self) -> post::PostOperations<E> {
        post::PostOperations::new(&self.engine)
    }

    /// Access Comment operations
    pub fn comment(&self) -> comment::CommentOperations<E> {
        comment::CommentOperations::new(&self.engine)
    }

}
