Skip to content

Commit

Permalink
Add support for additional model field types and arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
kaplanelad committed Jan 10, 2025
1 parent abe016e commit 049f500
Show file tree
Hide file tree
Showing 6 changed files with 407 additions and 59 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fs-err = "2.11.0"
# mailer
tera = "1.19.1"
thousands = "0.2.0"
heck = "0.4.0"
heck = { workspace = true }
cruet = "0.13.0"
lettre = { version = "0.11.4", default-features = false, features = [
"builder",
Expand Down Expand Up @@ -179,6 +179,7 @@ tower-http = { version = "0.6.1", features = [
"set-header",
"compression-full",
] }
heck = "0.4.0"

[dependencies.sea-orm-migration]
optional = true
Expand Down
1 change: 1 addition & 0 deletions loco-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ regex = { workspace = true }
tracing = { workspace = true }
chrono = { workspace = true }
colored = { workspace = true }
heck = { workspace = true }

clap = { version = "4.4.7", features = ["derive"] }
duct = "0.13"
Expand Down
7 changes: 0 additions & 7 deletions loco-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ impl Mappings {
.map(|f| &f.name)
.collect::<Vec<_>>()
}
pub fn rust_fields(&self) -> Vec<&String> {
self.field_types
.iter()
.filter(|f| f.rust.is_some())
.map(|f| &f.name)
.collect::<Vec<_>>()
}
}

static MAPPINGS: OnceLock<Mappings> = OnceLock::new();
Expand Down
Loading

0 comments on commit 049f500

Please sign in to comment.