* sea-orm-cli Implement derives & attributes parameters for entity generation (#1124)
* implement derives & attributes for cli
* fmt and clippy fix
* use comma delimiter for attributes arg
* Update help message use `'` instead of `"` to quote
* Refactoring
* remove unnecessary cloning
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* [CLI] generate model with extra derives and attributes
* clippy
Co-authored-by: Isaiah Gamble <77396670+tsar-boomba@users.noreply.github.com>
* Add serde skip options for hidden columns to the CLI (#1171)
* Add serde skip options for hidden columns to the CLI
* Resolve rustfmt and clippy issues
* Use SerdeDeriveOptions instead of WithSerde in tests
* Resolve upstream conflict
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* [CLI] serde_skip_hidden_column
* clippy
* clippy
Co-authored-by: Jacob Trueb <jtrueb@northwestern.edu>
* Implement entity writer context and date time crate enum
* Use entity writer context to render correct rust type according to chrono/time enum
* Add unit test to get col rs type with time crate
* Add date-time-crate flag for cli
* Edit usage of updated get_rs_type method
* Use arg enum for date time crate
* Move date time crate arg enum conversion into commands module
* Directly use arg enum
* Fixing import issues for arg enum w/ help from Billy
* feat(sea-orm-cli): output lof about generated file name.
https://github.com/SeaQL/sea-orm/issues/722
* include column names in info
* cargo fmt
* Update sea-orm-cli/src/commands.rs
Avoid multiple initializations
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* show info per column
* refactor: use write! macro
* Refactoring
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* feat: codegen unsigned integer
* feat: apply alias on `ColumnRef::SchemaTableColumn`
* Update SQLite test cases, quote identifier with double quotes
* Bump sea-query version to 0.22
* Add dummy line
* Tests [cli] and [issues]
* update sea-schema
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
This introduces several things to optionally support automatic derive attributes for `serde::{Deserialize, Serialize}` for the generated models:
- introduces a `WithSerde` enum to indicate if Serialize, Deserialize, or even both should be derived from,
- adds an optional cli argument `--with-serde [none: default, serialize, deserialize, both]`
- adds test harness for both compact and expanded generation