Re-export strum_macros
This commit is contained in:
parent
87c8d0dc8d
commit
7bf79ae5bf
@ -35,7 +35,7 @@ sea-query = { version = "^0.12" }
|
|||||||
sea-orm-macros = { path = "sea-orm-macros", optional = true }
|
sea-orm-macros = { path = "sea-orm-macros", optional = true }
|
||||||
serde = { version = "^1.0", features = [ "derive" ] }
|
serde = { version = "^1.0", features = [ "derive" ] }
|
||||||
sqlx = { version = "^0.5", optional = true }
|
sqlx = { version = "^0.5", optional = true }
|
||||||
strum = { version = "^0.20", features = [ "derive" ] }
|
strum = { path = "../strum/strum", version = "^0.21", features = [ "derive" ] }
|
||||||
serde_json = { version = "^1", optional = true }
|
serde_json = { version = "^1", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -7,7 +7,6 @@ publish = false
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = { version = "^1.9", features = [ "attributes" ] }
|
async-std = { version = "^1.9", features = [ "attributes" ] }
|
||||||
sea-orm = { path = "../../", features = [ "sqlx-mysql", "runtime-async-std-native-tls", "debug-print", "with-json", "macros" ], default-features = false }
|
sea-orm = { path = "../../", features = [ "sqlx-mysql", "runtime-async-std-native-tls", "debug-print", "with-json", "macros" ], default-features = false }
|
||||||
strum = { version = "^0.20", features = [ "derive" ] }
|
|
||||||
serde_json = { version = "^1" }
|
serde_json = { version = "^1" }
|
||||||
futures = { version = "^0.3" }
|
futures = { version = "^0.3" }
|
||||||
async-stream = { version = "^0.3" }
|
async-stream = { version = "^0.3" }
|
||||||
|
@ -16,12 +16,14 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
Id,
|
Id,
|
||||||
Name,
|
Name,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
Id,
|
Id,
|
||||||
}
|
}
|
||||||
@ -33,6 +35,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
Fruit,
|
Fruit,
|
||||||
}
|
}
|
||||||
|
@ -16,12 +16,14 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
CakeId,
|
CakeId,
|
||||||
FillingId,
|
FillingId,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
CakeId,
|
CakeId,
|
||||||
FillingId,
|
FillingId,
|
||||||
@ -34,6 +36,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
Cake,
|
Cake,
|
||||||
Filling,
|
Filling,
|
||||||
|
@ -16,12 +16,14 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
Id,
|
Id,
|
||||||
Name,
|
Name,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
Id,
|
Id,
|
||||||
}
|
}
|
||||||
@ -33,6 +35,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {}
|
pub enum Relation {}
|
||||||
|
|
||||||
impl ColumnTrait for Column {
|
impl ColumnTrait for Column {
|
||||||
|
@ -17,6 +17,7 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
Id,
|
Id,
|
||||||
Name,
|
Name,
|
||||||
@ -24,6 +25,7 @@ pub enum Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
Id,
|
Id,
|
||||||
}
|
}
|
||||||
@ -35,6 +37,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
Cake,
|
Cake,
|
||||||
}
|
}
|
||||||
|
@ -216,3 +216,4 @@ pub use sea_orm_macros::{
|
|||||||
pub use sea_query;
|
pub use sea_query;
|
||||||
pub use sea_query::Iden;
|
pub use sea_query::Iden;
|
||||||
pub use strum::EnumIter;
|
pub use strum::EnumIter;
|
||||||
|
pub use strum;
|
||||||
|
@ -17,12 +17,14 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
Id,
|
Id,
|
||||||
Name,
|
Name,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
Id,
|
Id,
|
||||||
}
|
}
|
||||||
@ -34,6 +36,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
Fruit,
|
Fruit,
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,14 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
CakeId,
|
CakeId,
|
||||||
FillingId,
|
FillingId,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
CakeId,
|
CakeId,
|
||||||
FillingId,
|
FillingId,
|
||||||
@ -35,6 +37,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
Cake,
|
Cake,
|
||||||
Filling,
|
Filling,
|
||||||
|
@ -17,12 +17,14 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
Id,
|
Id,
|
||||||
Name,
|
Name,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
Id,
|
Id,
|
||||||
}
|
}
|
||||||
@ -34,6 +36,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {}
|
pub enum Relation {}
|
||||||
|
|
||||||
impl ColumnTrait for Column {
|
impl ColumnTrait for Column {
|
||||||
|
@ -18,6 +18,7 @@ pub struct Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Column {
|
pub enum Column {
|
||||||
Id,
|
Id,
|
||||||
Name,
|
Name,
|
||||||
@ -25,6 +26,7 @@ pub enum Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum PrimaryKey {
|
pub enum PrimaryKey {
|
||||||
Id,
|
Id,
|
||||||
}
|
}
|
||||||
@ -36,6 +38,7 @@ impl PrimaryKeyTrait for PrimaryKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||||
|
#[strum(crate_path = "sea_orm::strum")]
|
||||||
pub enum Relation {
|
pub enum Relation {
|
||||||
Cake,
|
Cake,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user