InstitutionSearchDoc.kt 2.13 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * search-doc-service
 * Copyright (C) 2020 Memoriav
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
18
19
package org.memobase.model

Jonas Waeber's avatar
Jonas Waeber committed
20
import com.fasterxml.jackson.annotation.JsonIgnore
21
import com.fasterxml.jackson.annotation.JsonInclude
22
import org.memobase.helpers.Date
23
24
25

@JsonInclude(JsonInclude.Include.NON_EMPTY)
data class InstitutionSearchDoc(
Jonas Waeber's avatar
Jonas Waeber committed
26
    @JsonIgnore
27
28
    val institutionId: String,
    val published: Boolean,
29

30
31
    // Full Text Search
    val name: LanguageContainer,
32
33
34
35
    val description: LanguageContainer,
    val city: List<LanguageContainer>,
    val address: List<String>,
    val postalCodes: List<String>,
36
37

    // Facettes
Jonas Waeber's avatar
Jonas Waeber committed
38
39
40
    val canton: List<FacetContainer>,
    val type: List<FacetContainer>,
    val documentType: List<FacetContainer>,
41

42
43
44
    // Sort
    val lastUpdatedDate: String,

45
46
47
    // Search Result Display
    val keyVisualLink: String,
    val numberOfRecordSets: Int,
Jonas Waeber's avatar
Jonas Waeber committed
48
49
50
    val numberOfDocuments: Int,
    val teaserColor: String,
    val teaserColorComputed: String
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
) : Schema(institutionId) {
    companion object {
        val DEFAULT = InstitutionSearchDoc(
                "DefaultInsitutionId",
                false,
                LanguageContainer.EMPTY,
                LanguageContainer.EMPTY,
                emptyList(),
                emptyList(),
                emptyList(),
                emptyList(),
                emptyList(),
                emptyList(),
                Date.now,
                "",
                0,
                0,
                "",
                ""
        )
    }

}