| | |
| | | package kr.wisestone.owl.domain; |
| | | |
| | | import org.hibernate.annotations.DynamicInsert; |
| | | |
| | | import javax.persistence.*; |
| | | import java.io.Serializable; |
| | | import java.util.HashSet; |
| | |
| | | * Created by wisestone on 2018-03-07. |
| | | */ |
| | | @Entity |
| | | @DynamicInsert |
| | | public class IssueType extends BaseEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | private String name; |
| | | private String description; |
| | | private String color; |
| | | private Long usePartner; |
| | | private Boolean inheritPartners; |
| | | |
| | | @ManyToOne(fetch = FetchType.LAZY) |
| | | @JoinColumn(name = "workspace_id") |
| | |
| | | @JoinColumn(name = "workflow_id") |
| | | private Workflow workflow; |
| | | |
| | | @ManyToOne(fetch = FetchType.LAZY) |
| | | @JoinColumn(name = "project_id") |
| | | private Project project; |
| | | |
| | | @OneToMany(mappedBy = "issueType", cascade = {CascadeType.ALL}, orphanRemoval = true) |
| | | private Set<IssueTypeApiEndStatus> issueTypeApiEndStatuses; |
| | | |
| | | /*@ManyToOne(fetch = FetchType.LAZY) |
| | | @JoinColumn(name = "company_id") |
| | | private CompanyField companyField; |
| | | |
| | | @ManyToOne(fetch = FetchType.LAZY) |
| | | @JoinColumn(name = "isp_id") |
| | | private IspField ispField; |
| | | |
| | | @ManyToOne(fetch = FetchType.LAZY) |
| | | @JoinColumn(name = "hosting_id") |
| | | private HostingField hostingField;*/ |
| | | |
| | | @OneToMany(mappedBy = "issueType", cascade = { CascadeType.ALL }, orphanRemoval = true) |
| | | private Set<IssueTypeCustomField> issueTypeCustomFields = new HashSet<>(); |
| | | |
| | | |
| | | public IssueType(){} |
| | | |
| | | public IssueType(Workspace workspace, Workflow workflow, String name, String description, String color){ |
| | | public IssueType(Workspace workspace, Workflow workflow, String name, String description, String color, Long usePartner, Boolean inheritPartners){ |
| | | this.workspace = workspace; |
| | | this.workflow = workflow; |
| | | this.name = name; |
| | | this.description = description; |
| | | this.color = color; |
| | | this.usePartner = usePartner; |
| | | this.inheritPartners = inheritPartners; |
| | | } |
| | | |
| | | public Long getId() { |
| | |
| | | public void setIssueTypeCustomFields(Set<IssueTypeCustomField> issueTypeCustomFields) { |
| | | this.issueTypeCustomFields = issueTypeCustomFields; |
| | | } |
| | | |
| | | public Project getProject() { |
| | | return project; |
| | | } |
| | | |
| | | public void setProject(Project project) { |
| | | this.project = project; |
| | | } |
| | | |
| | | public Long getUsePartner() { |
| | | return usePartner; |
| | | } |
| | | |
| | | public void setUsePartner(Long usePartner) { |
| | | this.usePartner = usePartner; |
| | | } |
| | | |
| | | public Set<IssueTypeApiEndStatus> getIssueTypeApiEndStatuses() { |
| | | return issueTypeApiEndStatuses; |
| | | } |
| | | |
| | | public void setIssueTypeApiEndStatuses(Set<IssueTypeApiEndStatus> issueTypeApiEndStatuses) { |
| | | this.issueTypeApiEndStatuses = issueTypeApiEndStatuses; |
| | | } |
| | | |
| | | public Boolean getInheritPartners() { |
| | | return inheritPartners; |
| | | } |
| | | |
| | | public void setInheritPartners(Boolean inheritPartners) { |
| | | this.inheritPartners = inheritPartners; |
| | | } |
| | | } |