[REMOVE] FileUploadEntity 및 FileUploadRepository 삭제, WorkflowStepEntity에서 관련 필드 제거

main
bjkim 9 months ago
parent 6c44c47705
commit d9ded74190

@ -1,77 +0,0 @@
package kr.re.etri.autoflow.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.*;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.LocalDateTime;
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "tb_attachment")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "범용 첨부파일 엔티티")
public class FileUploadEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Schema(description = "첨부파일 ID", example = "1")
private Long id;
// 연관 엔티티 ex) workflow_step, projectentity
@Schema(description = "연관 엔티티 타입", example = "workflow_step")
@Column(nullable = false, length = 50)
private String refType;
@Schema(description = "연관 엔티티 ID", example = "1")
@Column(nullable = false)
private Long refId;
@Schema(description = "원본 파일명", example = "step1.yaml")
@Column(nullable = false, length = 255)
private String originalName;
@Schema(description = "저장된 파일명(UUID)", example = "a1b2c3d4-step1.yaml")
@Column(nullable = false, length = 255)
private String storedName;
@Schema(description = "MIME 타입", example = "application/x-yaml")
@Column(nullable = false, length = 100)
private String contentType;
@Schema(description = "파일 크기(byte)", example = "2048")
@Column(nullable = false)
private Long size;
@Schema(description = "스토리지 경로", example = "/uploads/workflow/step1.yaml")
@Column(nullable = false, length = 500)
private String storagePath;
@Schema(description = "업로더 ID", example = "admin")
@Column(nullable = false, length = 50)
private String regUserId;
@Schema(description = "업로드 일시", example = "2025-09-11T10:00:00")
@CreatedDate
@Column(nullable = false, updatable = false)
private LocalDateTime regDt;
// 추가된 필드들
@Schema(description = "파일 제목", example = "자율주행차량 데이터 셋")
@Column(length = 200)
private String title;
@Schema(description = "파일 버전 (정수)", example = "1")
@Column(nullable = false)
private Integer version;
@Schema(description = "파일 설명", example = "자율주행차량 데이터 모음집입니다.")
@Column(length = 1000)
private String description;
}

@ -66,9 +66,4 @@ public class WorkflowStepEntity {
@Schema(description = "프로젝트 아이디", example = "1", defaultValue = "0") @Schema(description = "프로젝트 아이디", example = "1", defaultValue = "0")
@Column(nullable = false) @Column(nullable = false)
private Long projectId; private Long projectId;
@OneToMany
@JoinColumn(name = "refId", referencedColumnName = "id", insertable = false, updatable = false)
private List<FileUploadEntity> files = new ArrayList<>();
} }

@ -1,11 +0,0 @@
package kr.re.etri.autoflow.repository;
import kr.re.etri.autoflow.entity.FileUploadEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface FileUploadRepository extends JpaRepository<FileUploadEntity, Long> {
}
Loading…
Cancel
Save