Entity prelude with external types
This commit is contained in:
parent
96313dc6d1
commit
2060e30f06
@ -5,3 +5,15 @@ pub use crate::{
|
||||
PrimaryKeyToColumn, PrimaryKeyTrait, QueryFilter, QueryResult, Related, RelationDef,
|
||||
RelationTrait, Select, Value,
|
||||
};
|
||||
|
||||
#[cfg(feature = "with-json")]
|
||||
pub use serde_json::Value as Json;
|
||||
|
||||
#[cfg(feature = "with-chrono")]
|
||||
pub use chrono::NaiveDateTime as DateTime;
|
||||
|
||||
#[cfg(feature = "with-rust_decimal")]
|
||||
pub use rust_decimal::Decimal;
|
||||
|
||||
#[cfg(feature = "with-uuid")]
|
||||
pub use uuid::Uuid;
|
||||
|
@ -1,5 +1,4 @@
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde_json::Value as Json;
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||
pub struct Entity;
|
||||
|
@ -1,6 +1,4 @@
|
||||
use rust_decimal::prelude::*;
|
||||
use sea_orm::entity::prelude::*;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||
pub struct Entity;
|
||||
|
@ -1,4 +1,3 @@
|
||||
use rust_decimal::prelude::*;
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||
|
@ -1,5 +1,3 @@
|
||||
use chrono::NaiveDateTime;
|
||||
use rust_decimal::prelude::*;
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
|
||||
@ -17,7 +15,7 @@ pub struct Model {
|
||||
pub total: Decimal,
|
||||
pub bakery_id: i32,
|
||||
pub customer_id: i32,
|
||||
pub placed_at: NaiveDateTime,
|
||||
pub placed_at: DateTime,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user