Expand description
§revelation-macros
Procedural macros for domain code generation.
§Quick Start
ⓘ
use revelation_macros::Entity;
#[derive(Entity)]
#[entity(table = "users", schema = "core")]
pub struct User {
#[id]
pub id: Uuid,
#[field(create, update, response)]
pub name: Option<String>,
#[field(create, response)]
pub email: Option<String>,
#[field(skip)]
pub password_hash: String,
#[field(response)]
#[auto]
pub created_at: DateTime<Utc>,
}Generates: CreateUserRequest, UpdateUserRequest, UserResponse,
UserRepository, UserRow, InsertableUser, mappers, SQL impl.
Derive Macros§
- Entity
- Derive macro for generating domain boilerplate.