feat: update ppid categories response

This commit is contained in:
hanif salafi 2024-05-07 13:51:09 +07:00
parent 97c3f583e4
commit 0127b2fbda
2 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,8 @@ func PpidDataCategoriesResponseMapper(ppidDataCategoriesReq *entity.PpidDataCate
Title: ppidDataCategoriesReq.Title,
Description: ppidDataCategoriesReq.Description,
Slug: ppidDataCategoriesReq.Slug,
ThumbnailUrl: "/ppid-data-categories/viewer/" + strconv.Itoa(int(ppidDataCategoriesReq.ID)),
ParentId: ppidDataCategoriesReq.ParentId,
ThumbnailUrl: "/ppid-data-categories/thumbnail/viewer/" + strconv.Itoa(int(ppidDataCategoriesReq.ID)),
IsActive: ppidDataCategoriesReq.IsActive,
CreatedAt: ppidDataCategoriesReq.CreatedAt,
UpdatedAt: ppidDataCategoriesReq.UpdatedAt,

View File

@ -7,6 +7,7 @@ type PpidDataCategoriesResponse struct {
Title string `json:"title"`
Description string `json:"description"`
Slug string `json:"slug"`
ParentId *uint `json:"parentId"`
ThumbnailUrl string `json:"thumbnailUrl"`
IsActive *bool `json:"isActive"`
CreatedAt time.Time `json:"createdAt"`