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

Use traits and derive macros for the common model functionality #244

Open
KevinCLydon opened this issue Sep 20, 2022 · 0 comments
Open

Use traits and derive macros for the common model functionality #244

KevinCLydon opened this issue Sep 20, 2022 · 0 comments
Labels
refactor A code refactor; does not constitute a functional change

Comments

@KevinCLydon
Copy link
Member

Most of the modules in the models module have a lot of functions in common where the only differences are the structs. It would save a lot of time and consolidate a lot of code if we could switch a lot of that over to use traits and derive macros. For example, a lot of those modules have a find_by_id function. We could create a trait called FindableById and write a derive macro to generate the code for it.

@KevinCLydon KevinCLydon added the refactor A code refactor; does not constitute a functional change label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor A code refactor; does not constitute a functional change
Projects
None yet
Development

No branches or pull requests

1 participant