diff --git a/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaCreateV1Request.java b/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaCreateV1Request.java index e2d6ef8f1..05074c44c 100644 --- a/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaCreateV1Request.java +++ b/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaCreateV1Request.java @@ -24,13 +24,13 @@ public record SocialMediaCreateV1Request( ) { public SocialMediaCreateCommand toCommand() { - return new SocialMediaCreateCommand( - ownerId, - ownerType, - socialMediaType, - name, - logoUrl, - url - ); + return SocialMediaCreateCommand.builder() + .ownerId(ownerId) + .ownerType(ownerType) + .socialMediaType(socialMediaType) + .name(name) + .logoUrl(logoUrl) + .url(url) + .build(); } } diff --git a/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaUpdateV1Request.java b/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaUpdateV1Request.java index a90430779..82fa5adca 100644 --- a/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaUpdateV1Request.java +++ b/backend/src/main/java/com/festago/admin/dto/socialmedia/SocialMediaUpdateV1Request.java @@ -15,10 +15,10 @@ public record SocialMediaUpdateV1Request( ) { public SocialMediaUpdateCommand toCommand() { - return new SocialMediaUpdateCommand( - name, - logoUrl, - url - ); + return SocialMediaUpdateCommand.builder() + .name(name) + .logoUrl(logoUrl) + .url(url) + .build(); } } diff --git a/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaCreateCommand.java b/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaCreateCommand.java index f4201fda3..6a88c0e1c 100644 --- a/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaCreateCommand.java +++ b/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaCreateCommand.java @@ -3,7 +3,9 @@ import com.festago.socialmedia.domain.OwnerType; import com.festago.socialmedia.domain.SocialMedia; import com.festago.socialmedia.domain.SocialMediaType; +import lombok.Builder; +@Builder public record SocialMediaCreateCommand( Long ownerId, OwnerType ownerType, diff --git a/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaUpdateCommand.java b/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaUpdateCommand.java index f4c0f756e..da5784e8a 100644 --- a/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaUpdateCommand.java +++ b/backend/src/main/java/com/festago/socialmedia/dto/command/SocialMediaUpdateCommand.java @@ -1,5 +1,8 @@ package com.festago.socialmedia.dto.command; +import lombok.Builder; + +@Builder public record SocialMediaUpdateCommand( String name, String url,