sea_orm

Derive Macro DeriveActiveModel

Source
#[derive(DeriveActiveModel)]
{
    // Attributes available to this derive:
    #[sea_orm]
}
Expand description

The DeriveActiveModel derive macro will implement ActiveModelTrait for ActiveModel which provides setters and getters for all active values in the active model.

ยงUsage

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

#[derive(Clone, Debug, PartialEq, DeriveModel, DeriveActiveModel)]
pub struct Model {
    pub id: i32,
    pub name: String,
}