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

Convert #[model(...)] attribute macro to a #[derive(Model)] derive macro #13

Open
5 of 6 tasks
jonahseguin opened this issue Jan 21, 2023 · 0 comments
Open
5 of 6 tasks
Assignees

Comments

@jonahseguin
Copy link
Member

jonahseguin commented Jan 21, 2023

  • Convert #[model] attribute macro to #[derive(Model)] derive macro
  • Add #[model(mongo(collection = "..."))] attribute helper to the derive macro
  • Enforce id field to have type Id<#ident, ? impl IdGuard>
  • Enforce (or add?) #[serde(rename = "_id")] to id field for mongo model structs
  • Enforce (or add?) #[serde(skip_serializing_if = "musty::prelude::Id::is_none")] to id field for all model structs
  • Update filter macro to accept special type for Id type (ex User::filter().id().eq(1) without having to call .into() on the value)
@jonahseguin jonahseguin self-assigned this Jan 25, 2023
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

No branches or pull requests

1 participant