Implemented weather stories support
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful

This commit is contained in:
2026-05-30 07:06:29 -05:00
parent bde515d146
commit ecea856e8e
18 changed files with 760 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
// weatherstories_mapper.go maps weather story rows into weather model payloads.
// Layer: adapters/outbound/postgres weather stories feature.
package postgres
import "gitea.maximumdirect.net/ejr/weatherfeeder/model"
func mapWeatherStoryRunParentRow(row weatherStoryRunParentRow) model.WeatherStoryRun {
return model.WeatherStoryRun{
OfficeID: stringValue(row.OfficeID),
AsOf: row.AsOf.UTC(),
Stories: nil,
}
}
func mapWeatherStoryRow(row weatherStoryRow) model.WeatherStory {
return model.WeatherStory{
OfficeID: stringValue(row.OfficeID),
StartTime: row.StartTime.UTC(),
EndTime: row.EndTime.UTC(),
UpdatedAt: row.UpdatedAt.UTC(),
Title: stringValue(row.Title),
Description: stringValue(row.Description),
AltText: stringValue(row.AltText),
Priority: row.Priority,
Order: row.StoryOrder,
DownloadURL: stringValue(row.DownloadURL),
}
}