-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(bookings): add configurable limits on booked assets #145
Conversation
… be ignored in the limit check (can't clash with itself)
Also our PR names follow a similar format to commits, something like |
Ok, I have updated the name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really great!
I think the only thing missing is some validation of booking_limits
.
You're handling the JSON::Any
column safely, but I think catching unexpected JSON at the ORM level would be good.
This can be achieved by either traversing the JSON::Any
at validation time or creating a type converter for the column (i.e. Hash(String, Int32)
)
@caspiano I tried using a converter, but it broke a bunch of tests, so I have added a method to validate. |
Co-authored-by: Caspian Baska <caspian@place.tech>
Co-authored-by: Caspian Baska <caspian@place.tech>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job!!
Add configurable booking limits.