Skip to content

Commit

Permalink
Merge pull request #135 from basenana/fix/doc
Browse files Browse the repository at this point in the history
fix doc create
  • Loading branch information
zwwhdls authored Dec 10, 2024
2 parents b5721c9 + b7528c4 commit 4c796ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/friday/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ type DocRequest struct {
Source string `json:"source,omitempty"`
WebUrl string `json:"webUrl,omitempty"`
Content string `json:"content"`
UnRead *bool `json:"unRead,omitempty"`
Mark *bool `json:"mark,omitempty"`
ParentID string `json:"parentId,omitempty"`
CreatedAt int64 `json:"createdAt,omitempty"`
ChangedAt int64 `json:"changedAt,omitempty"`
}
Expand All @@ -82,6 +85,9 @@ func (r *DocRequest) FromType(doc *types.Document) {
r.Source = doc.Source
r.WebUrl = doc.WebUrl
r.Content = doc.Content
r.Mark = doc.Marked
r.UnRead = doc.Unread
r.ParentID = strconv.Itoa(int(doc.ParentEntryID))
r.CreatedAt = doc.CreatedAt.Unix()
r.ChangedAt = doc.ChangedAt.Unix()
}
Expand Down

0 comments on commit 4c796ec

Please sign in to comment.