arcature-data 2026.2.0

Arcature high-level data layer: explicit-ownership model/query ergonomics over SeaORM/SQLx, N+1 detection, and migration lint.
Documentation
//! Fixture entities for the `arcature-data` integration tests.
//!
//! `user` has many `post` (a real `has_many` relation); `post` belongs to
//! `user` (a real `belongs_to` relation) — so eager loading and N+1 detection
//! can run against a real graph, not a degenerate single-table case.

#![allow(dead_code)]

use sea_orm::entity::prelude::*;

/// A row of the `users` table.
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "users")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    #[sea_orm(unique)]
    pub email: String,
    pub name: String,
    pub created_at: DateTimeWithTimeZone,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(has_many = "super::post_entity::Entity")]
    Posts,
}

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

impl ActiveModelBehavior for ActiveModel {}