-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 비즈니스 핵심 기능 패키지 이동 application.service -> domain.service
- Loading branch information
1 parent
4df7cc4
commit a546ed1
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
BE/error/src/main/java/com/example/demo/schedule/domain/service/DomainService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.example.demo.schedule.domain.service; | ||
|
||
import com.example.demo.schedule.application.model.ScheduleModel; | ||
import com.example.demo.schedule.application.model.converter.ScheduleEntityConverter; | ||
import com.example.demo.schedule.domain.ScheduleEntity; | ||
import com.example.demo.schedule.domain.ScheduleRepository; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.data.convert.EntityConverter; | ||
|
||
@RequiredArgsConstructor | ||
public class DomainService { | ||
|
||
|
||
private final ScheduleEntityConverter entityConverter; | ||
private final ScheduleRepository scheduleRepository; | ||
|
||
|
||
private Long createSchedule(ScheduleModel model) { | ||
|
||
ScheduleEntity entity = entityConverter.toEntity(model); | ||
ScheduleEntity save = scheduleRepository.save(entity); | ||
return save.getEventId(); | ||
} | ||
} |