qudoco-be/app/module/clients/mapper/clients.mapper.go

21 lines
509 B
Go
Raw Normal View History

2026-02-24 09:37:19 +00:00
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
}