feat: implemented own profile getter;

experiment: using custom automapper function to map profile to profileDto;
refactor: adjusted ProfileService to use pointer return types with models
This commit is contained in:
2025-07-20 21:39:21 +03:00
parent df54829a67
commit 705b420b9e
3 changed files with 28 additions and 13 deletions

View File

@@ -24,7 +24,7 @@ import (
"github.com/rafiulgits/go-automapper"
)
func Map(dbModel database.Profile, dtoModel dto.ProfileDto) {
func MapProfileDto(dbModel database.Profile, dtoModel dto.ProfileDto) {
automapper.Map(dbModel, &dbModel, func(src *database.Profile, dst *dto.ProfileDto) {
dst.Birthday = int64(dbModel.Birthday.Time.UnixMilli())
})