Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Generated ActiveEnum String Values And Model Column Names #2170

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

anshap1719
Copy link
Sponsor Contributor

@anshap1719 anshap1719 commented Mar 22, 2024

PR Info

New Features

  • Add support for column_name_case attribute in DeriveEntityModel for automatically generating column names for all fields based on case style provided.
  • Add support for column_name_case attribute in fields within a model that derives DeriveEntityModel for automatically generating column name based on case style provided.
  • Add support for rename_all attribute in DeriveActiveEnum for automatically generating string values for all variants of the enum based on case style provided.
  • Add support for rename attribute for variants of an ActiveEnum that derives DeriveActiveEnum for automatically generating string value for it based on case style provided.
  • Finalise names of newly added attributes.
  • Finalise allowed cases for column names
  • Finalise newly added error messages
  • Add documentation for new attributes

Dependents

@anshap1719
Copy link
Sponsor Contributor Author

@tyt2y3 @billy1624 Can I ask for your opinions for these:

  • Finalise names of newly added attributes.
  • Finalise allowed cases for column names
  • Finalise newly added error messages

@anshap1719 anshap1719 force-pushed the auto-generated-active-enum-strings branch from 208c70c to f23ebac Compare March 22, 2024 19:33
@anshap1719
Copy link
Sponsor Contributor Author

Hi @tyt2y3 @billy1624, sorry to ping you about this! Did you get a chance to look at it yet?

@tyt2y3 tyt2y3 requested a review from billy1624 April 24, 2024 17:20
Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @anshap1719, thanks for the PR! I think this is a good alternative to the existing renaming of entity columns and active enum variants!

@anshap1719 anshap1719 force-pushed the auto-generated-active-enum-strings branch from f23ebac to 35bca74 Compare April 25, 2024 16:04
@anshap1719
Copy link
Sponsor Contributor Author

@billy1624 This is ready for your review in my opinion.

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! @anshap1719

@billy1624 billy1624 requested a review from tyt2y3 May 2, 2024 07:13
@anshap1719
Copy link
Sponsor Contributor Author

Thanks @billy1624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Defaulting string_value For ActiveEnum Based On Renaming Rules On Variants
2 participants