feat: added go-automapper for mapping dtos;

feat: implemented mapspecial package for mapping dtos that are not possible to automap by default;
initialized profile service;
added dtos for profile and profileSettings
This commit is contained in:
2025-07-19 11:44:15 +03:00
parent 6f7d8bf244
commit fc0c73aa5b
9 changed files with 195 additions and 30 deletions

View File

@@ -383,7 +383,7 @@ type GetProfileByUsernameRestrictedRow struct {
AvatarUrl *string
Color string
ColorGrad string
HideProfileDetails *bool
HideProfileDetails bool
}
func (q *Queries) GetProfileByUsernameRestricted(ctx context.Context, arg GetProfileByUsernameRestrictedParams) (GetProfileByUsernameRestrictedRow, error) {
@@ -456,7 +456,7 @@ type GetProfilesRestrictedRow struct {
AvatarUrl *string
Color string
ColorGrad string
HideProfileDetails *bool
HideProfileDetails bool
}
func (q *Queries) GetProfilesRestricted(ctx context.Context, arg GetProfilesRestrictedParams) ([]GetProfilesRestrictedRow, error) {
@@ -1035,13 +1035,13 @@ WHERE id = $1
type UpdateProfileSettingsParams struct {
ID int64
HideFulfilled *bool
HideProfileDetails *bool
HideForUnauthenticated *bool
HideBirthday *bool
HideDates *bool
Captcha *bool
FollowersOnlyInteraction *bool
HideFulfilled bool
HideProfileDetails bool
HideForUnauthenticated bool
HideBirthday bool
HideDates bool
Captcha bool
FollowersOnlyInteraction bool
}
func (q *Queries) UpdateProfileSettings(ctx context.Context, arg UpdateProfileSettingsParams) error {