Use sea-strum

This commit is contained in:
Chris Tsang 2021-08-08 02:06:10 +08:00
parent 22b4b14a64
commit 31bee96798
3 changed files with 6 additions and 8 deletions

View File

@ -37,16 +37,13 @@ chrono = { version = "^0", optional = true }
futures = { version = "^0.3" }
futures-util = { version = "^0.3" }
rust_decimal = { version = "^1", optional = true }
sea-query = { version = "^0.12.8" }
sea-orm-macros = { path = "sea-orm-macros", optional = true }
sea-query = { version = "^0.12.8" }
sea-strum = { version = "^0.21", features = ["derive", "sea-orm"] }
serde = { version = "^1.0", features = ["derive"] }
sqlx = { version = "^0.5", optional = true }
sqlx-core = { version = "^0.5", optional = true }
sqlx-macros = { version = "^0.5", optional = true }
strum = { git = "https://github.com/SeaQL/strum.git", branch = "sea-orm", version = "^0.21", features = [
"derive",
"sea-orm",
] }
serde_json = { version = "^1", optional = true }
uuid = { version = "0.8", features = ["serde", "v4"], optional = true }

View File

@ -5,7 +5,7 @@ use crate::{
};
use sea_query::{Iden, IntoValueTuple};
use std::fmt::Debug;
pub use strum::IntoEnumIterator as Iterable;
pub use sea_strum::IntoEnumIterator as Iterable;
pub trait IdenStatic: Iden + Copy + Debug + 'static {
fn as_str(&self) -> &str;

View File

@ -213,7 +213,8 @@ pub use sea_orm_macros::{
DeriveActiveModel, DeriveActiveModelBehavior, DeriveColumn, DeriveEntity, DeriveModel,
DerivePrimaryKey, FromQueryResult,
};
pub use sea_query;
pub use sea_query::Iden;
pub use strum;
pub use strum::EnumIter;
pub use sea_strum;
pub use sea_strum::EnumIter;