changes...
This commit is contained in:
parent
41944884b4
commit
ab4b53fd40
26 changed files with 600 additions and 51 deletions
18
internal/interfaces/api/mapper/response_from_post_result.go
Normal file
18
internal/interfaces/api/mapper/response_from_post_result.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package mapper
|
||||
|
||||
import (
|
||||
"58team_blog/internal/application/common"
|
||||
"58team_blog/internal/interfaces/api/responses"
|
||||
)
|
||||
|
||||
func ResponseFromPostResult(result *common.PostResult) responses.PostResponse {
|
||||
return responses.PostResponse{
|
||||
Id: result.Id.String(),
|
||||
UserId: result.UserId.String(),
|
||||
Title: result.Title,
|
||||
Description: result.Description,
|
||||
Content: result.Content,
|
||||
CreatedAt: result.CreatedAt,
|
||||
UpdatedAt: result.UpdatedAt,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue