Organize entity prelude
This commit is contained in:
parent
e8b1c0b975
commit
a5f2ae69e9
@ -12,8 +12,8 @@ pub use crate::{
|
||||
pub use crate::{
|
||||
DeriveActiveEnum, DeriveActiveModel, DeriveActiveModelBehavior, DeriveColumn,
|
||||
DeriveCustomColumn, DeriveDisplay, DeriveEntity, DeriveEntityModel, DeriveIden,
|
||||
DeriveIntoActiveModel, DeriveModel, DerivePrimaryKey, DeriveRelatedEntity, DeriveRelation,
|
||||
FromJsonQueryResult,
|
||||
DeriveIntoActiveModel, DeriveModel, DerivePartialModel, DerivePrimaryKey, DeriveRelatedEntity,
|
||||
DeriveRelation, DeriveValueType,
|
||||
};
|
||||
|
||||
pub use async_trait;
|
||||
|
@ -351,7 +351,7 @@ pub use sea_orm_macros::{
|
||||
DeriveActiveEnum, DeriveActiveModel, DeriveActiveModelBehavior, DeriveColumn,
|
||||
DeriveCustomColumn, DeriveDisplay, DeriveEntity, DeriveEntityModel, DeriveIden,
|
||||
DeriveIntoActiveModel, DeriveMigrationName, DeriveModel, DerivePartialModel, DerivePrimaryKey,
|
||||
DeriveRelatedEntity, DeriveRelation, FromJsonQueryResult, FromQueryResult,
|
||||
DeriveRelatedEntity, DeriveRelation, DeriveValueType, FromJsonQueryResult, FromQueryResult,
|
||||
};
|
||||
|
||||
pub use sea_query;
|
||||
|
@ -1,4 +1,5 @@
|
||||
use sea_orm::entity::prelude::*;
|
||||
use sea_orm::FromJsonQueryResult;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||
|
@ -36,7 +36,6 @@ pub mod value_type_pg {
|
||||
}
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use sea_orm_macros::DeriveValueType;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DeriveValueType)]
|
||||
#[sea_orm(array_type = "Int")]
|
||||
|
@ -1,7 +1,6 @@
|
||||
pub mod common;
|
||||
pub use common::{features::*, setup::*, TestContext};
|
||||
use sea_orm::entity::prelude::*;
|
||||
use sea_orm_macros::DeriveIden;
|
||||
|
||||
#[derive(DeriveIden)]
|
||||
pub enum ClassName {
|
||||
@ -13,6 +12,7 @@ pub enum ClassName {
|
||||
|
||||
#[derive(DeriveIden)]
|
||||
pub enum Book {
|
||||
#[sea_orm(iden = "book_table")]
|
||||
Table,
|
||||
Id,
|
||||
#[sea_orm(iden = "turtle")]
|
||||
@ -38,7 +38,7 @@ fn main() -> Result<(), DbErr> {
|
||||
assert_eq!(ClassName::Text.to_string(), "text");
|
||||
|
||||
assert_eq!(Book::Id.to_string(), "id");
|
||||
assert_eq!(Book::Table.to_string(), "book");
|
||||
assert_eq!(Book::Table.to_string(), "book_table");
|
||||
assert_eq!(Book::Title.to_string(), "turtle");
|
||||
assert_eq!(Book::Text.to_string(), "TeXt");
|
||||
assert_eq!(Book::Type.to_string(), "ty_pe");
|
||||
|
Loading…
x
Reference in New Issue
Block a user