Skip to content

Commit

Permalink
Add relatedScores property to Score entity AtlasOfLivingAustralia/fie…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Jun 11, 2024
1 parent 1a610cc commit ac54c8f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion grails-app/conf/application.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,11 @@ environments {
app.uploads.url = "/document/download/"
grails.mail.host="localhost"
grails.mail.port=1025

grails.cache.ehcache = {
diskStore {
path "~/data/${appName}/ehcache"
}
}

}
test {
Expand Down
18 changes: 18 additions & 0 deletions grails-app/domain/au/org/ala/ecodata/RelatedScore.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package au.org.ala.ecodata

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import groovy.transform.EqualsAndHashCode
import groovy.transform.ToString


@EqualsAndHashCode
@ToString
@JsonIgnoreProperties(['metaClass', 'errors', 'expandoMetaClass'])
class RelatedScore {

String scoreId

/** A description of the association - e.g. Service Provider, Grantee, Sponsor */
String description

}
4 changes: 4 additions & 0 deletions grails-app/domain/au/org/ala/ecodata/Score.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Score {
/** Can be used to categorize scores */
List<String> tags

List<RelatedScore> relatedScores


/** Embedded document describing how the score should be calculated */
Map configuration
Expand All @@ -59,6 +61,8 @@ class Score {
version false
}

static embedded = ['relatedScores']

def beforeValidate() {
if (scoreId == null) {
scoreId = Identifiers.getNew(true, "")
Expand Down

0 comments on commit ac54c8f

Please sign in to comment.