mirror of
https://github.com/actix/actix-website
synced 2025-06-27 15:39:02 +02:00
docs: Add documentation supporting native, asynchronous database operations (#580)
* feat: add sea orm documents * feat: add description for sea orm cli
This commit is contained in:
16
examples/sea-orm-databases/src/users.rs
Normal file
16
examples/sea-orm-databases/src/users.rs
Normal file
@ -0,0 +1,16 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.4
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "users")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
Reference in New Issue
Block a user