mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-28 12:37:25 +00:00
Add modified_time field to Resource model and update logic for tracking modifications
This commit is contained in:
@@ -100,6 +100,11 @@ func CreateFile(filename string, description string, resourceID uint, storageID
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = tx.Model(&model.Resource{}).Where("id = ?", resourceID).
|
||||
UpdateColumn("modified_time", time.Now()).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user