25 lines
749 B
Go
25 lines
749 B
Go
package mapper
|
|
|
|
import (
|
|
"go-humas-be/app/database/entity"
|
|
res "go-humas-be/app/module/ppid_datas/response"
|
|
)
|
|
|
|
func PpidDatasResponseMapper(ppidDatasReq *entity.PpidDatas) (ppidDatasRes *res.PpidDatasResponse) {
|
|
if ppidDatasReq != nil {
|
|
ppidDatasRes = &res.PpidDatasResponse{
|
|
ID: ppidDatasReq.ID,
|
|
Title: ppidDatasReq.Title,
|
|
Description: ppidDatasReq.Description,
|
|
CategoryId: ppidDatasReq.CategoryId,
|
|
CreatedById: ppidDatasReq.CreatedById,
|
|
StatusId: ppidDatasReq.StatusId,
|
|
IsPublish: ppidDatasReq.IsPublish,
|
|
PublishedAt: ppidDatasReq.PublishedAt,
|
|
IsActive: ppidDatasReq.IsActive,
|
|
CreatedAt: ppidDatasReq.CreatedAt,
|
|
UpdatedAt: ppidDatasReq.UpdatedAt,
|
|
}
|
|
}
|
|
return ppidDatasRes
|
|
} |