diff --git a/api/src/main/java/hexagonal/api/room/application/port/in/CreateRoomCommand.java b/api/src/main/java/hexagonal/api/room/application/port/in/CreateRoomCommand.java new file mode 100644 index 0000000..c78f5ef --- /dev/null +++ b/api/src/main/java/hexagonal/api/room/application/port/in/CreateRoomCommand.java @@ -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(); + } + +} diff --git a/api/src/main/java/hexagonal/api/room/application/port/in/CreateRoomUseCase.java b/api/src/main/java/hexagonal/api/room/application/port/in/CreateRoomUseCase.java new file mode 100644 index 0000000..1c18a8f --- /dev/null +++ b/api/src/main/java/hexagonal/api/room/application/port/in/CreateRoomUseCase.java @@ -0,0 +1,5 @@ +package hexagonal.api.room.application.port.in; + +public interface CreateRoomUseCase { + Long createRoom(CreateRoomCommand command); +}