21 lines
509 B
Go
21 lines
509 B
Go
package mapper
|
|
|
|
import (
|
|
"web-qudo-be/app/database/entity"
|
|
res "web-qudo-be/app/module/clients/response"
|
|
)
|
|
|
|
func ClientsResponseMapper(clientsReq *entity.Clients) (clientsRes *res.ClientsResponse) {
|
|
if clientsReq != nil {
|
|
clientsRes = &res.ClientsResponse{
|
|
ClientID: clientsReq.ID,
|
|
Name: clientsReq.Name,
|
|
CreatedById: *clientsReq.CreatedById,
|
|
IsActive: *clientsReq.IsActive,
|
|
CreatedAt: clientsReq.CreatedAt,
|
|
UpdatedAt: clientsReq.UpdatedAt,
|
|
}
|
|
}
|
|
return clientsRes
|
|
}
|