entity_derive/lib.rs
1// SPDX-FileCopyrightText: 2025-2026 RAprogramm <andrey.rozanov.vl@gmail.com>
2// SPDX-License-Identifier: MIT
3
4#![doc = include_str!("../README.md")]
5#![doc(
6 html_logo_url = "https://raw.githubusercontent.com/RAprogramm/entity-derive/main/logo.png",
7 html_favicon_url = "https://raw.githubusercontent.com/RAprogramm/entity-derive/main/logo.png"
8)]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10#![warn(missing_docs)]
11
12//! # entity-derive
13//!
14//! One crate, all features. Re-exports:
15//! - [`Entity`] derive macro from `entity-derive-impl`
16//! - All types from `entity-core` ([`Pagination`], [`SortDirection`],
17//! [`Repository`])
18//!
19//! # Quick Start
20//!
21//! ```rust,ignore
22//! use entity_derive::{Entity, Pagination};
23//!
24//! #[derive(Entity)]
25//! #[entity(table = "users")]
26//! pub struct User {
27//! #[id]
28//! pub id: Uuid,
29//! #[field(create, update, response)]
30//! pub name: String,
31//! }
32//!
33//! // Use pagination
34//! let page = Pagination::page(0, 25);
35//! ```
36
37// Re-export derive macro
38// Re-export all core types
39pub use entity_core::*;
40pub use entity_derive_impl::Entity;