-
-
Notifications
You must be signed in to change notification settings - Fork 68
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: 891 - new "uploaded timestamp" field for raw images #892
Conversation
Impacted files: * `api_json_to_from_test.dart`: added tests around new field `uploaded` * `json_helper.dart`: added the `uploaded` field to from/to json conversion methods; refactored * `product_image.dart`: added field `uploaded`, for uploaded images only
@@ -130,6 +130,7 @@ class ProductImage { | |||
required String this.imgid, | |||
this.width, | |||
this.height, | |||
this.uploaded, |
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.
I think we can have a better variable name, maybe something like uploaded_on or created_at. Or is it the same var name in other places?
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.
Hi @AshAman999!
In this PR we have an 'uploaded_t'
JSON tag and an int? uploaded
field.
If we compare to similar fields:
- we also have a
'created_t'
JSON tag and acreated
field (cf. inProduct
) - but instead of
int?
in this PR, we do have a much more explicitDateTime?
Would you be OK with DateTime? uploaded
? That would be consistent with the rest of the timestamp fields in the package, and wouldn't be confusing with a DateTime?
type.
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.
per @AshAman999 's comment
Thank you @teolemon @AshAman999 for your comments! |
Thank you @teolemon @AshAman999: I've just merged the code with |
What
Fixes bug(s)
Part of
Impacted files:
api_json_to_from_test.dart
: added tests around new fielduploaded
json_helper.dart
: added theuploaded
field to from/to json conversion methods; refactoredproduct_image.dart
: added fielduploaded
, for uploaded images only