26 lines
596 B
Go
26 lines
596 B
Go
package mapper
|
|
|
|
import (
|
|
"jaecoo-be/app/database/entity"
|
|
"jaecoo-be/app/module/approval_histories/response"
|
|
)
|
|
|
|
func ApprovalHistoriesResponseMapper(history *entity.ApprovalHistories) *response.ApprovalHistoriesResponse {
|
|
if history == nil {
|
|
return nil
|
|
}
|
|
|
|
return &response.ApprovalHistoriesResponse{
|
|
ID: history.ID,
|
|
ModuleType: history.ModuleType,
|
|
ModuleId: history.ModuleId,
|
|
StatusId: history.StatusId,
|
|
Action: history.Action,
|
|
ApprovedBy: history.ApprovedBy,
|
|
Message: history.Message,
|
|
CreatedAt: history.CreatedAt,
|
|
UpdatedAt: history.UpdatedAt,
|
|
}
|
|
}
|
|
|