InstitutionSearchDoc.kt 1.41 KB
Newer Older
1
2
package org.memobase.model

Jonas Waeber's avatar
Jonas Waeber committed
3
import com.fasterxml.jackson.annotation.JsonIgnore
4
import com.fasterxml.jackson.annotation.JsonInclude
5
import org.memobase.helpers.Date
6
7
8

@JsonInclude(JsonInclude.Include.NON_EMPTY)
data class InstitutionSearchDoc(
Jonas Waeber's avatar
Jonas Waeber committed
9
    @JsonIgnore
10
11
    val institutionId: String,
    val published: Boolean,
12

13
14
    // Full Text Search
    val name: LanguageContainer,
15
16
17
18
    val description: LanguageContainer,
    val city: List<LanguageContainer>,
    val address: List<String>,
    val postalCodes: List<String>,
19
20

    // Facettes
Jonas Waeber's avatar
Jonas Waeber committed
21
22
23
    val canton: List<FacetContainer>,
    val type: List<FacetContainer>,
    val documentType: List<FacetContainer>,
24

25
26
27
    // Sort
    val lastUpdatedDate: String,

28
29
30
    // Search Result Display
    val keyVisualLink: String,
    val numberOfRecordSets: Int,
Jonas Waeber's avatar
Jonas Waeber committed
31
32
33
    val numberOfDocuments: Int,
    val teaserColor: String,
    val teaserColorComputed: String
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
) : Schema(institutionId) {
    companion object {
        val DEFAULT = InstitutionSearchDoc(
                "DefaultInsitutionId",
                false,
                LanguageContainer.EMPTY,
                LanguageContainer.EMPTY,
                emptyList(),
                emptyList(),
                emptyList(),
                emptyList(),
                emptyList(),
                emptyList(),
                Date.now,
                "",
                0,
                0,
                "",
                ""
        )
    }

}