Derive Macro rorm::Model

source ·
#[derive(Model)]
{
    // Attributes available to this derive:
    #[rorm]
}
Expand description
use rorm::Model;

#[derive(Model)]
struct User {

    #[rorm(id)]
    id: i32,

    #[rorm(max_length = 255, unique)]
    username: String,

    #[rorm(max_length = 255)]
    password: String,

    #[rorm(default = false)]
    admin: bool,

    age: i16,
}