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.

comment.go 1.0KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Copyright 2018 Jonas Franz. All rights reserved.
  3. // SPDX-License-Identifier: MIT
  4. package migration
  5. import "time"
  6. // Commentable can be commented upon
  7. type Commentable interface {
  8. Reviewable
  9. GetContext() DownloaderContext
  10. }
  11. // Comment is a standard comment information
  12. type Comment struct {
  13. IssueIndex int64 `yaml:"issue_index"`
  14. Index int64
  15. CommentType string `yaml:"comment_type"` // see `commentStrings` in models/issues/comment.go
  16. PosterID int64 `yaml:"poster_id"`
  17. PosterName string `yaml:"poster_name"`
  18. PosterEmail string `yaml:"poster_email"`
  19. Created time.Time
  20. Updated time.Time
  21. Content string
  22. Reactions []*Reaction
  23. Meta map[string]any `yaml:"meta,omitempty"` // see models/issues/comment.go for fields in Comment struct
  24. }
  25. // GetExternalName ExternalUserMigrated interface
  26. func (c *Comment) GetExternalName() string { return c.PosterName }
  27. // ExternalID ExternalUserMigrated interface
  28. func (c *Comment) GetExternalID() int64 { return c.PosterID }