narasiahli-be/app/module/agent/mapper/agent.mapper.go

25 lines
567 B
Go
Raw Normal View History

2026-02-01 16:11:03 +00:00
package mapper
import (
"narasi-ahli-be/app/database/entity"
"narasi-ahli-be/app/module/agent/response"
)
func AgentResponseMapper(agent *entity.Agent) *response.AgentResponse {
if agent == nil {
return nil
}
return &response.AgentResponse{
ID: agent.ID,
AgentID: agent.AgentID,
Name: agent.Name,
Description: agent.Description,
Instructions: agent.Instructions,
Type: agent.Type,
Status: agent.Status,
IsActive: agent.IsActive,
CreatedAt: agent.CreatedAt,
UpdatedAt: agent.UpdatedAt,
}
}