Skip to content

Commit

Permalink
35373 Add name to molecular analysis run item
Browse files Browse the repository at this point in the history
- Added name field to MolecularRunItemDto and MolecularAnalysisRunItem
  • Loading branch information
johnphan96 committed Dec 6, 2024
1 parent a464e79 commit d6fced6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class MolecularAnalysisRunItemDto {

private String usageType;

private String name;

@JsonApiRelation
private MolecularAnalysisRunDto run;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public class MolecularAnalysisRunItem implements DinaEntity {
@Column(name = "usage_type")
private String usageType;

@NotBlank
@Size(max = 50)
private String name;

// eager since we need it for group-based permission
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "molecular_analysis_run_id")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://local.xsd/dbchangelog-4.4.xsd"
objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS">

<changeSet id="58-Add_name_to_MolecularAnalysisRunItem" context="schema-change"
author="phanm">
<addColumn tableName="molecular_analysis_run_item">
<column name="name" type="VARCHAR(50)">
<constraints nullable="false" />
</column>
</addColumn>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static MolecularAnalysisRunItem.MolecularAnalysisRunItemBuilder newMolecu
.uuid(UUID.randomUUID())
.createdBy("test user")
.usageType(SeqReactionDto.TYPENAME)
.name("test-name")
.run(run);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public static MolecularAnalysisRunItemDto newMolecularAnalysisRunItem() {
return MolecularAnalysisRunItemDto.builder()
.createdBy("test-user")
.usageType(SeqReactionDto.TYPENAME)
.name("test-name")
.build();
}
}

0 comments on commit d6fced6

Please sign in to comment.