You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

issue_comment.go 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2016 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package structs
  5. import (
  6. "time"
  7. )
  8. // Comment represents a comment on a commit or issue
  9. type Comment struct {
  10. ID int64 `json:"id"`
  11. HTMLURL string `json:"html_url"`
  12. PRURL string `json:"pull_request_url"`
  13. IssueURL string `json:"issue_url"`
  14. Poster *User `json:"user"`
  15. OriginalAuthor string `json:"original_author"`
  16. OriginalAuthorID int64 `json:"original_author_id"`
  17. Body string `json:"body"`
  18. // swagger:strfmt date-time
  19. Created time.Time `json:"created_at"`
  20. // swagger:strfmt date-time
  21. Updated time.Time `json:"updated_at"`
  22. }
  23. // CreateIssueCommentOption options for creating a comment on an issue
  24. type CreateIssueCommentOption struct {
  25. // required:true
  26. Body string `json:"body" binding:"Required"`
  27. }
  28. // EditIssueCommentOption options for editing a comment
  29. type EditIssueCommentOption struct {
  30. // required: true
  31. Body string `json:"body" binding:"Required"`
  32. }