Display created time of files.

This commit is contained in:
2025-10-04 21:10:47 +08:00
parent ff30125518
commit af52e7b764
3 changed files with 8 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ type FileView struct {
Resource *ResourceView `json:"resource,omitempty"`
Hash string `json:"hash,omitempty"`
StorageName string `json:"storage_name,omitempty"`
CreatedAt int64 `json:"created_at,omitempty"`
}
func (f *File) ToView() *FileView {
@@ -43,6 +44,7 @@ func (f *File) ToView() *FileView {
User: f.User.ToView(),
Hash: f.Hash,
StorageName: f.Storage.Name,
CreatedAt: f.CreatedAt.Unix(),
}
}