Skip to content

Commit ccb1cc4

Browse files
Enhance EntityFile entity with additional indexes and column mappings
1 parent bca044f commit ccb1cc4

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/domain

extensions/entity-files/sources/core/src/main/java/tools/dynamia/modules/entityfile/domain/EntityFile.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040

4141
@Entity
4242
@Table(name = "mod_entity_files", indexes = {
43-
@Index(name = "idx_uuid", columnList = "uuid")
43+
@Index(name = "idx_uuid", columnList = "uuid"),
44+
@Index(name = "idx_accountId", columnList = "accountId"),
45+
@Index(name = "idx_target_entity", columnList = "targetEntity,targetEntityId"),
46+
@Index(name = "idx_subfolder", columnList = "subfolder")
47+
4448
})
4549
@BatchSize(size = 80)
4650
public class EntityFile extends BaseEntity implements URLable {
@@ -71,15 +75,17 @@ public class EntityFile extends BaseEntity implements URLable {
7175
private EntityFileState state;
7276
@NotEmpty
7377
private String uuid = StringUtils.randomString();
74-
@Column(length = 1000)
78+
@Column(name = "storageInfo", length = 1000)
7579
private String storageInfo;
7680

81+
@Column(name = "subfolder")
7782
private String subfolder;
7883
private String storedFileName;
7984

8085
@Column(length = 500)
8186
private String remoteURL;
8287

88+
@Column(name = "accountId")
8389
private Long accountId;
8490
private String externalRef;
8591

0 commit comments

Comments
 (0)