restructure generator
This commit is contained in:
3
tests/src/models/_entities/mod.rs
Normal file
3
tests/src/models/_entities/mod.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.8
|
||||
|
||||
pub mod user ;
|
||||
9
tests/src/models/_entities/user.rs
Normal file
9
tests/src/models/_entities/user.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.8
|
||||
|
||||
|
||||
|
||||
use sea_orm :: entity :: prelude :: * ;
|
||||
|
||||
# [derive (Clone , Debug , PartialEq , DeriveEntityModel , Eq)] # [sea_orm (table_name = "user")] pub struct Model { # [sea_orm (primary_key)] pub id : i32 , # [sea_orm (unique)] pub username : String , # [sea_orm (unique)] pub email : String , pub password : String , # [sea_orm (unique)] pub test : String , }
|
||||
|
||||
# [derive (Copy , Clone , Debug , EnumIter , DeriveRelation)] pub enum Relation { }
|
||||
1
tests/src/models/mod.rs
Normal file
1
tests/src/models/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod prelude;pub mod user;
|
||||
1
tests/src/models/prelude.rs
Normal file
1
tests/src/models/prelude.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub use super::_entities::UserModel::{ActiveModel as UserActiveModel, Model as UserModel, Entity as User};
|
||||
9
tests/src/models/user.rs
Normal file
9
tests/src/models/user.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use super::prelude::*;
|
||||
use sea_orm::ActiveModelBehavior;
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl ActiveModelBehavior for UserActiveModel {}
|
||||
|
||||
impl UserModel {}
|
||||
|
||||
impl UserActiveModel {}
|
||||
Reference in New Issue
Block a user