Add modified_time field to Resource model and update logic for tracking modifications

This commit is contained in:
2025-09-27 16:22:04 +08:00
parent c131f48448
commit e117a2e708
3 changed files with 11 additions and 3 deletions

View File

@@ -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
})