refactoring, удаление deprecated сущностей
This commit is contained in:
parent
368ba49119
commit
bf68f3fe0a
|
|
@ -1,21 +0,0 @@
|
|||
package ru.oa2.lti.application.infrastructure.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import ru.oa2.lti.infrastructure.adapter.persistence.jpa.entity.HistoryEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @deprecated Используйте {@link ru.oa2.lti.infrastructure.adapter.persistence.jpa.repository.HistoryJpaRepository}
|
||||
* Этот интерфейс оставлен для обратной совместимости и будет удален в следующей версии.
|
||||
*/
|
||||
@Deprecated
|
||||
@Repository
|
||||
public interface HistoryRepository extends JpaRepository<HistoryEntity, Long> {
|
||||
|
||||
List<HistoryEntity> findByContentUuidOrderByCreatedDesc(UUID contentUuid);
|
||||
|
||||
List<HistoryEntity> findByDeploymentIdOrderByCreatedDesc(UUID deploymentId);
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package ru.oa2.lti.application.infrastructure.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import ru.oa2.lti.infrastructure.adapter.persistence.jpa.entity.LMSContentEntity;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @deprecated Используйте {@link ru.oa2.lti.infrastructure.adapter.persistence.jpa.repository.LMSContentJpaRepository}
|
||||
* Этот интерфейс оставлен для обратной совместимости и будет удален в следующей версии.
|
||||
*/
|
||||
@Deprecated
|
||||
@Repository
|
||||
public interface LMSContentRepository extends JpaRepository<LMSContentEntity, Long> {
|
||||
|
||||
Optional<LMSContentEntity> getLMSContentByContentUuid(UUID contextId);
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package ru.oa2.lti.application.infrastructure.repository.entities;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @deprecated Используйте {@link ru.oa2.lti.infrastructure.adapter.persistence.jpa.entity.HistoryEntity}
|
||||
* Этот класс оставлен для обратной совместимости и будет удален в следующей версии.
|
||||
*/
|
||||
@Deprecated
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "history")
|
||||
public class History {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
long id;
|
||||
|
||||
@Column(name = "deployment_id", nullable = false)
|
||||
UUID deploymentId;
|
||||
|
||||
@Column(name = "content_uuid", nullable = false)
|
||||
UUID contentUuid;
|
||||
|
||||
@Column(name = "created", nullable = false)
|
||||
LocalDateTime created;
|
||||
|
||||
@Column(name = "message", nullable = false, length = 2048)
|
||||
String message;
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
package ru.oa2.lti.application.infrastructure.repository.entities;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @deprecated Используйте {@link ru.oa2.lti.infrastructure.adapter.persistence.jpa.entity.LMSContentEntity}
|
||||
* Этот класс оставлен для обратной совместимости и будет удален в следующей версии.
|
||||
*/
|
||||
@Deprecated
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "lms_content",
|
||||
indexes = {
|
||||
@Index(name = "idx_content_uuid", columnList = "content_uuid")
|
||||
})
|
||||
public class LMSContent {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
long id;
|
||||
|
||||
@Column(name = "deployment_id", nullable = false)
|
||||
UUID deploymentId;
|
||||
|
||||
@Column(name = "content_uuid", nullable = false)
|
||||
UUID contentUuid;
|
||||
|
||||
@Column(name = "created", nullable = false)
|
||||
LocalDateTime created;
|
||||
|
||||
@Column(name = "task_id", nullable = false)
|
||||
Long taskId;
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package ru.oa2.lti.application.infrastructure.repository.entities;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @deprecated Используйте {@link ru.oa2.lti.infrastructure.adapter.persistence.jpa.entity.TaskEntity}
|
||||
* Этот класс оставлен для обратной совместимости и будет удален в следующей версии.
|
||||
*/
|
||||
@Deprecated
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "task")
|
||||
public class Task {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
long id;
|
||||
|
||||
@Column(name = "name", nullable = false, length = 250)
|
||||
String name;
|
||||
|
||||
@Column(name = "description", nullable = false, columnDefinition = "text")
|
||||
String description;
|
||||
|
||||
@Column(name = "init_script", columnDefinition = "text")
|
||||
String initScript;
|
||||
|
||||
@Column(name = "verification_script", columnDefinition = "text")
|
||||
String verificationScript;
|
||||
|
||||
@Column(name = "delete_script", columnDefinition = "text")
|
||||
String deleteScript;
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import ru.oa2.lti.application.infrastructure.repository.HistoryRepository;
|
||||
import ru.oa2.lti.infrastructure.adapter.persistence.jpa.repository.HistoryJpaRepository;
|
||||
import ru.oa2.lti.infrastructure.adapter.persistence.jpa.entity.HistoryEntity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -14,9 +14,9 @@ import java.util.UUID;
|
|||
@Service
|
||||
public class HistoryServiceImpl implements HistoryService {
|
||||
|
||||
private final HistoryRepository historyRepository;
|
||||
private final HistoryJpaRepository historyRepository;
|
||||
|
||||
public HistoryServiceImpl(HistoryRepository historyRepository) {
|
||||
public HistoryServiceImpl(HistoryJpaRepository historyRepository) {
|
||||
this.historyRepository = historyRepository;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue