OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-01-13 4545664bbece1b1b185945376b344b1660669a53
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package kr.wisestone.owl.domain;
 
import kr.wisestone.owl.domain.enumType.AttachedType;
import kr.wisestone.owl.domain.enumType.FileType;
 
import javax.persistence.*;
import java.io.Serializable;
 
@Entity
public class AttachedFile extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 847376294732544822L;
 
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String name;
    private String path;
    private Long size;
    private String contentType;
    private String awsKey;
    @Enumerated(EnumType.STRING)
    private FileType fileType;
 
    @Enumerated(EnumType.STRING)
    private AttachedType attachedType;
 
    @ManyToOne(fetch= FetchType.EAGER)
    @JoinColumn(name="issue_id")
    private Issue issue;
    //  파일 다운로드 오류 해결
    @ManyToOne(fetch= FetchType.EAGER)
    @JoinColumn(name="workspace_id")
    private Workspace workspace;
 
    public AttachedFile() {
    }
 
    public AttachedFile(String name, Long size, String contentType, String path) {
        this.name = name;
        this.path = path;
        this.size = size;
        this.contentType = contentType;
    }
 
    public AttachedFile(String name, Long size, String contentType, String path, String awsKey, Issue issue, Workspace workspace, FileType fileType, AttachedType attachedType) {
        this.name = name;
        this.size = size;
        this.contentType = contentType;
        this.path = path;
        this.awsKey = awsKey;
        this.issue = issue;
        this.workspace = workspace;
        this.fileType = fileType;
        this.attachedType = attachedType;
    }
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getPath() {
        return path;
    }
 
    public void setPath(String path) {
        this.path = path;
    }
 
    public Long getSize() {
        return size;
    }
 
    public void setSize(Long size) {
        this.size = size;
    }
 
    public String getContentType() {
        return contentType;
    }
 
    public void setContentType(String contentType) {
        this.contentType = contentType;
    }
 
    public Issue getIssue() {
        return issue;
    }
 
    public void setIssue(Issue issue) {
        this.issue = issue;
    }
 
    public Workspace getWorkspace() {
        return workspace;
    }
 
    public void setWorkspace(Workspace workspace) {
        this.workspace = workspace;
    }
 
    public FileType getFileType() {
        return fileType;
    }
 
    public void setFileType(FileType fileType) {
        this.fileType = fileType;
    }
 
    public String getAwsKey() {
        return awsKey;
    }
 
    public void setAwsKey(String awsKey) {
        this.awsKey = awsKey;
    }
 
    public AttachedType getAttachedType() {
        return attachedType;
    }
 
    public void setAttachedType(AttachedType attachedType) {
        this.attachedType = attachedType;
    }
}