20 lines
497 B
Go
20 lines
497 B
Go
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),
|
|
}
|
|
}
|