// 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), } }