SeaQL / sea-orm

🐚 An async & dynamic ORM for Rust
https://www.sea-ql.org/SeaORM/
Apache License 2.0
7.37k stars 517 forks source link

add `--with-prelude` option to sea-orm-cli #2322

Open hahouari opened 3 months ago

hahouari commented 3 months ago

I opened a discussion on this feature a month ago (link below), I suppose it didn't take notice, so I picked it up and implemented the feature myself on my free time, and I'm happy to contribute it back :).

PR Info

New Features

Added --with-prelude option to sea-orm-cli generate entity command, it accepts 3 values:

This is how it looks like with --with-prelude=all:

image

This is how it looks like with --with-prelude=all-allow-unused-imports:

image