jagan-parthiban commented on code in PR #7408:
URL: https://github.com/apache/trafficcontrol/pull/7408#discussion_r1140155491


##########
traffic_ops/traffic_ops_golang/servicecategory/servicecategories.go:
##########
@@ -187,3 +187,136 @@ WHERE name=$2 RETURNING last_updated`
 func deleteQuery() string {
        return `DELETE FROM service_category WHERE name=:name`
 }
+
+// TOServiceCategoryV5 uses tc.ServiceCategoryV5 which has the updated Time 
Format TimeRFC3339.
+type TOServiceCategoryV5 struct {
+       api.APIInfoImpl `json:"-"`
+       tc.ServiceCategoryV5
+}
+
+func (v *TOServiceCategoryV5) GetLastUpdated() (*time.Time, bool, error) {
+       return api.GetLastUpdatedByName(v.APIInfo().Tx, v.Name, 
"service_category")
+}
+
+func (v *TOServiceCategoryV5) SetLastUpdated(t tc.TimeRFC3339) { v.LastUpdated 
= t }

Review Comment:
   Time for changed to tc.TimeRFC3339. Rest of the functions are simply copied 
from the V4 version.



##########
traffic_ops/traffic_ops_golang/servicecategory/servicecategories.go:
##########
@@ -187,3 +187,136 @@ WHERE name=$2 RETURNING last_updated`
 func deleteQuery() string {
        return `DELETE FROM service_category WHERE name=:name`
 }
+
+// TOServiceCategoryV5 uses tc.ServiceCategoryV5 which has the updated Time 
Format TimeRFC3339.
+type TOServiceCategoryV5 struct {

Review Comment:
   Introducted new struct TOServiceCategoryV5 to be used that refered to 
tc.ServiceCategoryV5



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to