28 lines
965 B
Go
28 lines
965 B
Go
|
|
package mapper
|
||
|
|
|
||
|
|
import (
|
||
|
|
"go-humas-be/app/database/entity"
|
||
|
|
res "go-humas-be/app/module/ppid_data_files/response"
|
||
|
|
)
|
||
|
|
|
||
|
|
func PpidDataFilesResponseMapper(ppidDataFilesReq *entity.PpidDataFiles) (ppidDataFilesRes *res.PpidDataFilesResponse) {
|
||
|
|
if ppidDataFilesReq != nil {
|
||
|
|
ppidDataFilesRes = &res.PpidDataFilesResponse{
|
||
|
|
ID: ppidDataFilesReq.ID,
|
||
|
|
Title: ppidDataFilesReq.Title,
|
||
|
|
PpidDataId: ppidDataFilesReq.PpidDataId,
|
||
|
|
Description: ppidDataFilesReq.Description,
|
||
|
|
Unit: ppidDataFilesReq.Unit,
|
||
|
|
FileType: ppidDataFilesReq.FileType,
|
||
|
|
DownloadCount: ppidDataFilesReq.DownloadCount,
|
||
|
|
CreatedById: ppidDataFilesReq.CreatedById,
|
||
|
|
StatusId: ppidDataFilesReq.StatusId,
|
||
|
|
IsPublish: ppidDataFilesReq.IsPublish,
|
||
|
|
PublishedAt: ppidDataFilesReq.PublishedAt,
|
||
|
|
IsActive: ppidDataFilesReq.IsActive,
|
||
|
|
CreatedAt: ppidDataFilesReq.CreatedAt,
|
||
|
|
UpdatedAt: ppidDataFilesReq.UpdatedAt,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return ppidDataFilesRes
|
||
|
|
}
|