ormkit-derive 0.1.0

Derive macros for ormkit ORM library
Documentation

ormkit-derive

Procedural macros for ormkit ORM framework.

This crate provides derive macros for automatically implementing ORM traits:

  • #[derive(Entity)] - Implements the Entity trait
  • #[ormkit(table = "name")] - Specifies table name
  • #[ormkit(id)] - Marks the primary key field
  • #[ormkit(belongs_to = "Entity")] - Defines relationships

Example

use ormkit::Entity;

#[derive(ormkit::Entity)]
#[ormkit(table = "users")]
struct User {
    #[ormkit(id)]
    id: Uuid,
    email: String,
    name: String,
}