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_milestone.go 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // Milestone milestone is a collection of issues on one repository
  9. type Milestone struct {
  10. ID int64 `json:"id"`
  11. Title string `json:"title"`
  12. Description string `json:"description"`
  13. State StateType `json:"state"`
  14. OpenIssues int `json:"open_issues"`
  15. ClosedIssues int `json:"closed_issues"`
  16. // swagger:strfmt date-time
  17. Created time.Time `json:"created_at"`
  18. // swagger:strfmt date-time
  19. Updated *time.Time `json:"updated_at"`
  20. // swagger:strfmt date-time
  21. Closed *time.Time `json:"closed_at"`
  22. // swagger:strfmt date-time
  23. Deadline *time.Time `json:"due_on"`
  24. }
  25. // CreateMilestoneOption options for creating a milestone
  26. type CreateMilestoneOption struct {
  27. Title string `json:"title"`
  28. Description string `json:"description"`
  29. // swagger:strfmt date-time
  30. Deadline *time.Time `json:"due_on"`
  31. // enum: open,closed
  32. State string `json:"state"`
  33. }
  34. // EditMilestoneOption options for editing a milestone
  35. type EditMilestoneOption struct {
  36. Title string `json:"title"`
  37. Description *string `json:"description"`
  38. State *string `json:"state"`
  39. Deadline *time.Time `json:"due_on"`
  40. }