refactor: Update 'Content' field in HasuraRepository.CreateNew method

This commit is contained in:
windyboy
2024-08-09 11:07:07 +08:00
parent 091a054eab
commit 85ce23cb16
5 changed files with 29 additions and 29 deletions
+12 -12
View File
@@ -92,26 +92,26 @@ type ParsedMessage struct {
DateTime string `json:"dateTime"` // 日期时间: The date and time of the message (e.g., '150631').
PriorityIndicator string `json:"priorityIndicator"` // 优先级标识: The priority level of the message (e.g., 'FF').
PrimaryAddress string `json:"primaryAddress"` // 主要地址: The primary recipient address (e.g., 'ZBTJZPZX').
SecondaryAddresses []string `json:"secondaryAddresses,omitempty"` // 次要地址: Additional recipient addresses (e.g., ['150630', 'ZBACZQZX']).
SecondaryAddresses string `json:"secondaryAddresses,omitempty"` // 次要地址: Additional recipient addresses (e.g., ['150630', 'ZBACZQZX']).
Originator string `json:"originator,omitempty"` // 发件人: The sender of the message.
OriginatorDateTime string `json:"originatorDateTime,omitempty"` // 发件日期时间: The date and time when the originator sent the message.
Category string `json:"category,omitempty"` // 类别: The category of the message.
Text string `json:"bodyAndFooter,omitempty"` // 正文和页脚: The body and footer of the message (e.g., 'CALLSIGN/ABC123\nFPL/AB1234-AB\n...').
Body string `json:"body,omitempty"` // 正文: The body of the message.
BodyData interface{} `json:"bodyData,omitempty"` // 正文数据: Parsed body data.
ReceivedAt time.Time `json:"receivedAt"` // 接收时间: The time when the message was received.
ParsedAt time.Time `json:"parsedAt,omitempty"` // 解析时间: The time when the message was parsed.
DispatchedAt time.Time `json:"dispatchedAt,omitempty"` // 分发时间: The time when the message was dispatched.
NeedDispatch bool `json:"needDispatch"` // 需要分发: Indicates if the message needs to be dispatched.
Parsed bool `json:"parsed"` // 解析: Indicates if the message has been parsed.
Comments string `json:"comments,omitempty"` // 备注: Additional comments.
Body string // 正文和页脚: The body and footer of the message (e.g., 'CALLSIGN/ABC123\nFPL/AB1234-AB\n...').
Content string `json:"content,omitempty"` // 正文: The body of the message.
BodyData interface{} `json:"bodyData,omitempty"` // 正文数据: Parsed body data.
ReceivedAt time.Time `json:"receivedAt"` // 接收时间: The time when the message was received.
ParsedAt time.Time `json:"parsedAt,omitempty"` // 解析时间: The time when the message was parsed.
DispatchedAt time.Time `json:"dispatchedAt,omitempty"` // 分发时间: The time when the message was dispatched.
NeedDispatch bool `json:"needDispatch"` // 需要分发: Indicates if the message needs to be dispatched.
Parsed bool `json:"parsed"` // 解析: Indicates if the message has been parsed.
Comments string `json:"comments,omitempty"` // 备注: Additional comments.
}
// NewParsedMessage initializes a ParsedMessage with default values
func NewParsedMessage() *ParsedMessage {
return &ParsedMessage{
SecondaryAddresses: []string{},
Parsed: false,
// SecondaryAddresses: []string{},
Parsed: false,
}
}