restructure generator

This commit is contained in:
2025-04-08 22:03:18 +04:00
parent 3ed3e079f2
commit 8fd390fe18
25 changed files with 595 additions and 377 deletions

View File

@@ -0,0 +1,3 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.8
pub mod user ;

View 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
View File

@@ -0,0 +1 @@
pub mod prelude;pub mod user;

View 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
View File

@@ -0,0 +1,9 @@
use super::prelude::*;
use sea_orm::ActiveModelBehavior;
#[async_trait::async_trait]
impl ActiveModelBehavior for UserActiveModel {}
impl UserModel {}
impl UserActiveModel {}