Refactored the application structure to better separate concerns between files and packages
Some checks failed
ci/woodpecker/push/build-image Pipeline failed
Some checks failed
ci/woodpecker/push/build-image Pipeline failed
This commit is contained in:
59
internal/adapters/outbound/postgres/alerts_rows.go
Normal file
59
internal/adapters/outbound/postgres/alerts_rows.go
Normal file
@@ -0,0 +1,59 @@
|
||||
// alerts_rows.go defines row DTOs for alert-run, alert, and reference reads.
|
||||
// Layer: adapters/outbound/postgres alerts feature.
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"gitea.maximumdirect.net/ejr/weatherfeeder/model"
|
||||
)
|
||||
|
||||
type alertRunParentRow struct {
|
||||
EventID string
|
||||
LocationID sql.NullString
|
||||
LocationName sql.NullString
|
||||
AsOf time.Time
|
||||
Latitude sql.NullFloat64
|
||||
Longitude sql.NullFloat64
|
||||
}
|
||||
|
||||
type alertRow struct {
|
||||
AlertIndex int
|
||||
AlertID string
|
||||
Event sql.NullString
|
||||
Headline sql.NullString
|
||||
Severity sql.NullString
|
||||
Urgency sql.NullString
|
||||
Certainty sql.NullString
|
||||
Status sql.NullString
|
||||
MessageType sql.NullString
|
||||
Category sql.NullString
|
||||
Response sql.NullString
|
||||
Description sql.NullString
|
||||
Instruction sql.NullString
|
||||
Sent sql.NullTime
|
||||
Effective sql.NullTime
|
||||
Onset sql.NullTime
|
||||
Expires sql.NullTime
|
||||
AreaDescription sql.NullString
|
||||
SenderName sql.NullString
|
||||
}
|
||||
|
||||
type indexedAlert struct {
|
||||
Index int
|
||||
Alert model.WeatherAlert
|
||||
}
|
||||
|
||||
type alertReferenceRow struct {
|
||||
AlertIndex int
|
||||
ID sql.NullString
|
||||
Identifier sql.NullString
|
||||
Sender sql.NullString
|
||||
Sent sql.NullTime
|
||||
}
|
||||
|
||||
type indexedAlertReference struct {
|
||||
AlertIndex int
|
||||
Reference model.AlertReference
|
||||
}
|
||||
Reference in New Issue
Block a user