-
Notifications
You must be signed in to change notification settings - Fork 22
Add Optional Timestamps Support to Models #411
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
Add Optional Timestamps Support to Models #411
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #411 +/- ##
============================================
+ Coverage 80.84% 81.46% +0.62%
- Complexity 2669 2685 +16
============================================
Files 238 239 +1
Lines 7114 7147 +33
============================================
+ Hits 5751 5822 +71
+ Misses 1363 1325 -38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
charoyan88
left a comment
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.
Request changes
This PR adds opt-in automatic timestamps for
DbModelvia the newHasTimestampstrait.Models using the trait automatically manage
created_at(on insert) andupdated_at(on insert/update), with support for custom column names and unix/datetime formats.Manual timestamp assignments were removed from demo services/controllers where redundant, and unit tests were added to cover default + custom behavior.