Initial commit
This commit is contained in:
commit
c0cb826917
63 changed files with 2069 additions and 0 deletions
20
internal/application/mapper/image_result.go
Normal file
20
internal/application/mapper/image_result.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package mapper
|
||||
|
||||
import (
|
||||
"58team_blog/internal/application/common"
|
||||
"58team_blog/internal/application/queries"
|
||||
"58team_blog/internal/domain/entities"
|
||||
)
|
||||
|
||||
func CreateImageResultFromEntity(entity *entities.Images) *common.ImageResult {
|
||||
return &common.ImageResult{
|
||||
Id: entity.Id,
|
||||
Path: entity.Path,
|
||||
}
|
||||
}
|
||||
|
||||
func CreateImageFindByIdResultFromEntity(entity *entities.Images) *queries.ImageFindByIdResult {
|
||||
return &queries.ImageFindByIdResult{
|
||||
Result: CreateImageResultFromEntity(entity),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue