Added migrations
This commit is contained in:
parent
4a16acc87e
commit
5b18009658
34 changed files with 929 additions and 154 deletions
18
internal/interfaces/api/dto/response_from_post_result.go
Normal file
18
internal/interfaces/api/dto/response_from_post_result.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package dto
|
||||
|
||||
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