Mercurial > gemma
diff pkg/imports/modelconvert.go @ 3171:c8ded555c2a8
Sections import: Added a sections import. Derived from the stretches import w/o the countries.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 06 May 2019 16:36:03 +0200 |
parents | a10022399e24 |
children | 51e90370eced |
line wrap: on
line diff
--- a/pkg/imports/modelconvert.go Mon May 06 16:18:41 2019 +0200 +++ b/pkg/imports/modelconvert.go Mon May 06 16:36:03 2019 +0200 @@ -28,6 +28,7 @@ FDJobKind: func() interface{} { return new(models.FairwayDimensionImport) }, DMAJobKind: func() interface{} { return new(models.DistanceMarksAshoreImport) }, STJobKind: func() interface{} { return new(models.StretchImport) }, + SECJobKind: func() interface{} { return new(models.SectionImport) }, } func ImportModelForJobKind(kind JobKind) func() interface{} { @@ -144,6 +145,20 @@ Countries: sti.Countries, } }, + + SECJobKind: func(input interface{}) interface{} { + seci := input.(*models.SectionImport) + return &Section{ + Name: seci.Name, + From: seci.From, + To: seci.To, + Tolerance: seci.Tolerance, + ObjNam: seci.ObjNam, + NObjNam: seci.NObjNam, + Source: seci.Source, + Date: seci.Date, + } + }, } func nilString(s *string) string {