Browse Source

remove record time field

sainw 5 years ago
parent
commit
f16f29d4c0
1 changed files with 0 additions and 21 deletions
  1. 0 21
      vo.go

+ 0 - 21
vo.go

@@ -1,7 +1,6 @@
 package syncer
 
 import (
-	"encoding/json"
 	"time"
 )
 
@@ -49,23 +48,3 @@ type ClientPriceUpdate struct {
 	RecCreatedAt  string `json:"rec_create_at"`
 	RecUpdatedAt  string `json:"rec_update_at"`
 }
-
-// Custom unmarshal for date time of the record
-func (s *ClientPriceUpdate) UnmarshalJSON(data []byte) error {
-	var aux ClientPriceUpdate
-	if err := json.Unmarshal(data, &aux); err != nil {
-		return err
-	}
-	createdAt, e := time.Parse("2006-01-02 15:04:05.999999999-07:00", aux.RecCreatedAt)
-	if e != nil {
-		return e
-	}
-	updatedAt, e := time.Parse("2006-01-02 15:04:05.999999999-07:00", aux.RecUpdatedAt)
-	if e != nil {
-		return e
-	}
-
-	s.CreatedAt = createdAt
-	s.UpdatedAt = updatedAt
-	return nil
-}