Skip to content

Commit

Permalink
๐Ÿ‘”๏ธ ์ฑ„ํŒ…๋ฐฉ ์ƒ์„ฑ In Port UseCase, Command(#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Jul 2, 2022
1 parent 48d49df commit 623353c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package hexagonal.api.room.application.port.in;

import hexagonal.core.domain.jpa.RoomJpaEntity;
import lombok.Getter;

@Getter
public class CreateRoomCommand {

private final Long companyId;
private final Long adminId;

public CreateRoomCommand(Long companyId, Long adminId) {
this.companyId = companyId;
this.adminId = adminId;
}

public RoomJpaEntity toJpaEntity() {
return RoomJpaEntity.builder()
.id(null)
.companyId(companyId)
.adminId(adminId)
.build();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package hexagonal.api.room.application.port.in;

public interface CreateRoomUseCase {
Long createRoom(CreateRoomCommand command);
}

0 comments on commit 623353c

Please sign in to comment.