🍱 Lagring av valgfri aktørid i database
Co-authored-by: Amalie Mansåker <amalie.erdal.mansaker@nav.no>
This commit is contained in:
parent
d1b2b7be95
commit
bc45642b71
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,7 @@ import org.jetbrains.exposed.sql.transactions.transaction
|
||||||
|
|
||||||
class FeilmeldingRepository {
|
class FeilmeldingRepository {
|
||||||
fun lagre(feilmelding: Feilmelding) {
|
fun lagre(feilmelding: Feilmelding) {
|
||||||
|
|
||||||
transaction {
|
transaction {
|
||||||
FeilmeldingTable.run {
|
FeilmeldingTable.run {
|
||||||
insert {
|
insert {
|
||||||
|
@ -24,6 +25,10 @@ class FeilmeldingRepository {
|
||||||
it[FeilmeldingTable.dato] = feilmelding.dato
|
it[FeilmeldingTable.dato] = feilmelding.dato
|
||||||
it[FeilmeldingTable.arbeidsstatus] = feilmelding.arbeidsstatus
|
it[FeilmeldingTable.arbeidsstatus] = feilmelding.arbeidsstatus
|
||||||
it[FeilmeldingTable.haster] = feilmelding.haster
|
it[FeilmeldingTable.haster] = feilmelding.haster
|
||||||
|
|
||||||
|
if (feilmelding.aktorid != null){
|
||||||
|
it[FeilmeldingTable.aktorid] = feilmelding.aktorid
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue