-
Notifications
You must be signed in to change notification settings - Fork 0
Krb-883 import old data #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
erik-itland
wants to merge
11
commits into
main
Choose a base branch
from
KRB-0_import_old_data
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6c8c271
KRB-883 Generate types using json_typegen.exe
d0f7d4c
KRB-883 Rename Root to Banks and Root2 to Bank
erik-itland 6fc5d04
KRB-883 Create test. Remove unneeded classes.
erik-itland bd6d364
KRB-883 Fix package for frontend types
erik-itland 01678ad
KRB-883 Add bulk import
erik-itland 77b4584
KRB-883 Let hibernate decide column names, simplify queries
erik-itland 2140ba6
KRB-883 Don't propagate typos into our code
erik-itland 985e3a5
KRB-883 Fix mvnw permissions
erik-itland 0cdade4
KRB-883 Set project on imported needs
erik-itland dcda830
KRB-883 Allow localhost:3000 in CORS
erik-itland 9506243
KRB-883 Improve import
erik-itland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
200 changes: 200 additions & 0 deletions
200
src/main/kotlin/org/kravbank/domain/frontend/FrontendTypes.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,200 @@ | ||
| package org.kravbank.domain.frontend | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty | ||
|
|
||
| typealias Banks = List<Bank> | ||
|
|
||
| data class Bank( | ||
| val id: String, | ||
| val title: String, | ||
| val description: String, | ||
| val needs: List<Need>, | ||
| val codelist: List<Codelist>, | ||
| val products: List<Product>, | ||
| val publications: List<Publication>, | ||
| val tags: List<Tag>, | ||
| val version: Long, | ||
| val publishedDate: String?, | ||
| val type: String, | ||
| val inheritedBanks: List<Any?>, | ||
| val sourceOriginal: Any?, | ||
| val sourceRel: Any?, | ||
| val projectId: String?, | ||
| val deletedDate: Any?, | ||
| ) | ||
|
|
||
| data class Need( | ||
| val id: String, | ||
| val title: String, | ||
| val description: String, | ||
| val requirements: List<Requirement>, | ||
| val type: String, | ||
| val parent: String, | ||
| val sourceOriginal: String?, | ||
| val sourceRel: Any?, | ||
| ) | ||
|
|
||
| data class Requirement( | ||
| val id: String, | ||
| val title: String, | ||
| val description: String, | ||
| val needId: String, | ||
| val type: String, | ||
| val variants: List<Variant>, | ||
| val tags: List<Any?>?, | ||
| val sourceOriginal: String?, | ||
| val sourceRel: Any?, | ||
| val weight: Long?, | ||
| @JsonProperty("requirement_Type") | ||
| val requirementType: String?, | ||
| ) | ||
|
|
||
| data class Variant( | ||
| val id: String, | ||
| val requirementText: String, | ||
| val instruction: String, | ||
| val useProduct: Boolean, | ||
| val useSpesification: Boolean, | ||
| val useQualification: Boolean, | ||
| val products: List<String>, | ||
| val questions: List<Question>, | ||
| val type: String?, | ||
| val description: String?, | ||
| ) | ||
|
|
||
| data class Question( | ||
| val id: String, | ||
| val type: String, | ||
| val config: Config?, | ||
| val answer: Answer?, | ||
| val sourceRel: Any?, | ||
| val sourceOriginal: Any?, | ||
| ) | ||
|
|
||
| data class Config( | ||
| val min: Long?, | ||
| val max: Long?, | ||
| val step: Double?, | ||
| val unit: String?, | ||
| val defaultPoint: Long?, | ||
| val scoreValues: List<ScoreValue>?, | ||
| val fromBoundary: Any?, | ||
| val toBoundary: Any?, | ||
| val isPeriod: Boolean?, | ||
| val periodMin: Long?, | ||
| val periodMax: Long?, | ||
| val dateScores: List<DateScore>?, | ||
| val periodMinutes: Long?, | ||
| val periodHours: Long?, | ||
| val timeScores: List<TimeScore>?, | ||
| val pointsUnconfirmed: Long?, | ||
| val pointsNonPrefered: Long?, | ||
| val preferedAlternative: Boolean?, | ||
| val discountNonPrefered: Long?, | ||
| val discountPrefered: Long?, | ||
| val defaultDiscount: Long?, | ||
| val mandatoryCodes: List<Any?>?, | ||
| val optionalCodes: List<Any?>?, | ||
| val codelist: String?, | ||
| val codes: List<Any?>?, | ||
| val optionalCodeMinAmount: Long?, | ||
| val optionalCodeMaxAmount: Long?, | ||
| val template: Any?, | ||
| val uploadInSpec: Boolean?, | ||
| val allowMultipleFiles: Boolean?, | ||
| val fileEndings: List<Any?>?, | ||
| val specMin: Long?, | ||
| val specMax: Long?, | ||
| val fromDate: String?, | ||
| val toDate: String?, | ||
| val multipleSelect: Boolean?, | ||
| val fromTime: String?, | ||
| val toTime: String?, | ||
| val discountValues: List<Any?>?, | ||
| val duration: Long?, | ||
| val weekdays: List<Any?>?, | ||
| val discount: Long?, | ||
| ) | ||
|
|
||
| data class ScoreValue( | ||
| val score: Long, | ||
| val value: Long, | ||
| ) | ||
|
|
||
| data class DateScore( | ||
| val date: Any?, | ||
| val score: Long, | ||
| ) | ||
|
|
||
| data class TimeScore( | ||
| val time: Any?, | ||
| val score: Long, | ||
| ) | ||
|
|
||
| data class Answer( | ||
| val point: Long?, | ||
| val value: Any?, | ||
| val fromDate: Any?, | ||
| val toDate: Any?, | ||
| val fromTime: Any?, | ||
| val toTime: Any?, | ||
| val discount: Long?, | ||
| val text: String?, | ||
| val codes: List<Any?>?, | ||
| val files: List<String>?, | ||
| ) | ||
|
|
||
| data class Codelist( | ||
| val id: String, | ||
| val title: String, | ||
| val description: String, | ||
| val codes: List<Code>, | ||
| val type: String, | ||
| val sourceOriginal: String?, | ||
| val sourceRel: Any?, | ||
| ) | ||
|
|
||
| data class Code( | ||
| val id: String, | ||
| val title: String, | ||
| val description: String, | ||
| val type: String, | ||
| val sourceOriginal: String?, | ||
| val sourceRel: Any?, | ||
| val parent: String?, | ||
| ) | ||
|
|
||
| data class Product( | ||
| val id: String, | ||
| val title: String, | ||
| val description: String, | ||
| val type: String, | ||
| val parent: String, | ||
| val sourceOriginal: String?, | ||
| val sourceRel: Any?, | ||
| val deletedDate: String?, | ||
| val unit: String?, | ||
| val requirements: List<Requirement>?, | ||
| ) | ||
|
|
||
| data class Publication( | ||
| val id: String, | ||
| val bankId: String, | ||
| val comment: String, | ||
| val date: String, | ||
| val type: String, | ||
| val version: Long, | ||
| val sourceOriginal: Any?, | ||
| val sourceRel: Any?, | ||
| val deletedDate: String?, | ||
| ) | ||
|
|
||
| data class Tag( | ||
| val id: String, | ||
| val title: String, | ||
| val description: String?, | ||
| val type: String, | ||
| val parent: String, | ||
| val sourceOriginal: String, | ||
| val sourceRel: Any?, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unikhet skal være innenfor prosjekt, ikke på tvers av prosjekter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Men det her er vel ref-en til selve prosjektet. Om den ikke er unik på toppnivå så vil vi ikke kunne hente prosjekter basert på ref?