Skip to content

Commit

Permalink
feat: 비즈니스 핵심 기능 패키지 이동 application.service -> domain.service
Browse files Browse the repository at this point in the history
  • Loading branch information
capDoYeonLee committed Oct 1, 2024
1 parent 4df7cc4 commit a546ed1
Showing 1 changed file with 24 additions and 0 deletions.
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();
}
}

0 comments on commit a546ed1

Please sign in to comment.