update arrival pattern

This commit is contained in:
windyboy
2024-07-29 23:33:08 +08:00
parent 8593f6ce9d
commit 14f3dc7321
4 changed files with 395 additions and 502 deletions
+2 -2
View File
@@ -65,8 +65,8 @@ const (
// - arrival: the four-letter arrival airport code
arrPatternString = `^\((?P<category>[A-Z]{3})` +
`-(?P<number>[A-Z0-9]+)(\/?(?P<ssr>[A-Z0-9]+))?` +
`-(?P<dep>[A-Z]{4})` +
`-(?P<arr>[A-Z]{4})(?P<arr_time>\d{4})\)$`
`-(?P<departure>[A-Z]{4})` +
`-(?P<arrival>[A-Z]{4})(?P<arrival_time>\d{4})\)$`
// depPatternString represents the regular expression pattern used to match departure patterns.
// The pattern matches strings in the format: "(TYPE-NUMBER-SSR-DEPARTURE-DEPARTURE_TIME-ARRIVAL)".
+14 -2
View File
@@ -14,31 +14,40 @@ import (
// input type for inserting data into table "aviation.telegrams"
type Aviation_telegrams_insert_input struct {
Text string `json:"Text"`
Body_and_footer string `json:"body_and_footer"`
Body_data json.RawMessage `json:"body_data"`
Category string `json:"category"`
Comments string `json:"comments"`
Date_time string `json:"date_time"`
Dispatched_at time.Time `json:"dispatched_at"`
Message_id string `json:"message_id"`
Need_dispatch bool `json:"need_dispatch"`
Originator string `json:"originator"`
Originator_date_time string `json:"originator_date_time"`
Parsed bool `json:"parsed"`
Parsed_at time.Time `json:"parsed_at"`
Primary_address string `json:"primary_address"`
Priority_indicator string `json:"priority_indicator"`
Received_at time.Time `json:"received_at"`
Secondary_addresses string `json:"secondary_addresses"`
Secondary_addresses json.RawMessage `json:"secondary_addresses"`
Uuid uuid.UUID `json:"uuid"`
}
// GetText returns Aviation_telegrams_insert_input.Text, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetText() string { return v.Text }
// GetBody_and_footer returns Aviation_telegrams_insert_input.Body_and_footer, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetBody_and_footer() string { return v.Body_and_footer }
// GetBody_data returns Aviation_telegrams_insert_input.Body_data, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetBody_data() json.RawMessage { return v.Body_data }
// GetCategory returns Aviation_telegrams_insert_input.Category, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetCategory() string { return v.Category }
// GetComments returns Aviation_telegrams_insert_input.Comments, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetComments() string { return v.Comments }
// GetDate_time returns Aviation_telegrams_insert_input.Date_time, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetDate_time() string { return v.Date_time }
@@ -59,6 +68,9 @@ func (v *Aviation_telegrams_insert_input) GetOriginator_date_time() string {
return v.Originator_date_time
}
// GetParsed returns Aviation_telegrams_insert_input.Parsed, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetParsed() bool { return v.Parsed }
// GetParsed_at returns Aviation_telegrams_insert_input.Parsed_at, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetParsed_at() time.Time { return v.Parsed_at }
@@ -72,7 +84,7 @@ func (v *Aviation_telegrams_insert_input) GetPriority_indicator() string { retur
func (v *Aviation_telegrams_insert_input) GetReceived_at() time.Time { return v.Received_at }
// GetSecondary_addresses returns Aviation_telegrams_insert_input.Secondary_addresses, and is useful for accessing the field via an interface.
func (v *Aviation_telegrams_insert_input) GetSecondary_addresses() string {
func (v *Aviation_telegrams_insert_input) GetSecondary_addresses() json.RawMessage {
return v.Secondary_addresses
}
+1 -1
View File
@@ -37,7 +37,7 @@ func (hr *HasuraRepository) CreateNew(pm *domain.ParsedMessage) error {
Message_id: pm.MessageID,
Priority_indicator: pm.PriorityIndicator,
Primary_address: pm.PrimaryAddress,
Secondary_addresses: string(secondAddress),
Secondary_addresses: []byte(secondAddress),
Text: pm.Text,
Body_data: bodyString,
Category: pm.Category,
File diff suppressed because it is too large Load Diff