|
@@ -23,15 +23,15 @@ func (up *cudTime) toMapForCreate() map[string]interface{} {
|
|
val["delete_time"] = 0
|
|
val["delete_time"] = 0
|
|
val["is_deleted"] = false
|
|
val["is_deleted"] = false
|
|
val["update_time"] = up.TimeSec
|
|
val["update_time"] = up.TimeSec
|
|
- val["updated_date"] = up.Time
|
|
|
|
- val["created_date"] = up.Time
|
|
|
|
|
|
+ val["updated_date"] = firestore.ServerTimestamp
|
|
|
|
+ val["created_date"] = firestore.ServerTimestamp
|
|
return val
|
|
return val
|
|
}
|
|
}
|
|
|
|
|
|
func (up *cudTime) toMapForUpdate() map[string]interface{} {
|
|
func (up *cudTime) toMapForUpdate() map[string]interface{} {
|
|
val := make(map[string]interface{})
|
|
val := make(map[string]interface{})
|
|
val["update_time"] = up.TimeSec
|
|
val["update_time"] = up.TimeSec
|
|
- val["updated_date"] = up.Time
|
|
|
|
|
|
+ val["updated_date"] = firestore.ServerTimestamp
|
|
return val
|
|
return val
|
|
}
|
|
}
|
|
|
|
|
|
@@ -40,8 +40,8 @@ func (up *cudTime) toMapForDelete() map[string]interface{} {
|
|
val["is_deleted"] = true
|
|
val["is_deleted"] = true
|
|
val["update_time"] = up.TimeSec
|
|
val["update_time"] = up.TimeSec
|
|
val["delete_time"] = up.TimeSec
|
|
val["delete_time"] = up.TimeSec
|
|
- val["updated_date"] = up.Time
|
|
|
|
- val["deleted_date"] = up.Time
|
|
|
|
|
|
+ val["updated_date"] = firestore.ServerTimestamp
|
|
|
|
+ val["deleted_date"] = firestore.ServerTimestamp
|
|
return val
|
|
return val
|
|
}
|
|
}
|
|
|
|
|