WIP: страницы для правил #62

Closed
Ghost wants to merge 132 commits from master into 61-rules-pages
3 changed files with 28 additions and 0 deletions
Showing only changes of commit f9fd839a14 - Show all commits

View File

@ -13,6 +13,8 @@ import ru.ulstu.extractor.gitrepository.model.GitRepository;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType; import javax.persistence.FetchType;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
@ -20,6 +22,8 @@ import javax.persistence.OneToMany;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static ru.ulstu.extractor.branch.model.IndexingStatus.EMPTY;
@Entity @Entity
public class Branch extends BaseEntity { public class Branch extends BaseEntity {
private String name; private String name;
@ -32,6 +36,9 @@ public class Branch extends BaseEntity {
@Fetch(FetchMode.SUBSELECT) @Fetch(FetchMode.SUBSELECT)
private List<Commit> commits = new ArrayList<>(); private List<Commit> commits = new ArrayList<>();
@Enumerated(EnumType.STRING)
private IndexingStatus indexingStatus = EMPTY;
public Branch() { public Branch() {
} }
@ -67,4 +74,12 @@ public class Branch extends BaseEntity {
public void setCommits(List<Commit> commits) { public void setCommits(List<Commit> commits) {
this.commits = commits; this.commits = commits;
} }
public IndexingStatus getIndexingStatus() {
return indexingStatus;
}
public void setIndexingStatus(IndexingStatus indexingStatus) {
this.indexingStatus = indexingStatus;
}
} }

View File

@ -0,0 +1,5 @@
package ru.ulstu.extractor.branch.model;
public enum IndexingStatus {
EMPTY, INDEXING, FINISHED
}

View File

@ -99,4 +99,12 @@
OR branch_id is null; OR branch_id is null;
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="orion" id="20230207-220000-1">
<addColumn tableName="branch">
<column name="indexing_status" type="varchar(100)"/>
</addColumn>
<update tableName="branch">
<column name="indexing_status" value="FINISHED"/>
</update>
</changeSet>
</databaseChangeLog> </databaseChangeLog>