28 lines
1.2 KiB
Go
28 lines
1.2 KiB
Go
// monorepo/cloud/backend/internal/maplefile/service/file/utils.go
|
|
package file
|
|
|
|
import (
|
|
dom_file "codeberg.org/mapleopentech/monorepo/cloud/maplefile-backend/internal/domain/file"
|
|
)
|
|
|
|
// Helper function to map a File domain model to a FileResponseDTO
|
|
func mapFileToDTO(file *dom_file.File) *FileResponseDTO {
|
|
return &FileResponseDTO{
|
|
ID: file.ID,
|
|
CollectionID: file.CollectionID,
|
|
OwnerID: file.OwnerID,
|
|
EncryptedMetadata: file.EncryptedMetadata,
|
|
EncryptedFileKey: file.EncryptedFileKey,
|
|
EncryptionVersion: file.EncryptionVersion,
|
|
EncryptedHash: file.EncryptedHash,
|
|
EncryptedFileSizeInBytes: file.EncryptedFileSizeInBytes,
|
|
EncryptedThumbnailSizeInBytes: file.EncryptedThumbnailSizeInBytes,
|
|
Tags: file.Tags,
|
|
CreatedAt: file.CreatedAt,
|
|
ModifiedAt: file.ModifiedAt,
|
|
Version: file.Version,
|
|
State: file.State,
|
|
TombstoneVersion: file.TombstoneVersion,
|
|
TombstoneExpiry: file.TombstoneExpiry,
|
|
}
|
|
}
|