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

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2016 The Gogs Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import (
  5. "time"
  6. )
  7. // Milestone milestone is a collection of issues on one repository
  8. type Milestone struct {
  9. ID int64 `json:"id"`
  10. Title string `json:"title"`
  11. Description string `json:"description"`
  12. State StateType `json:"state"`
  13. OpenIssues int `json:"open_issues"`
  14. ClosedIssues int `json:"closed_issues"`
  15. // swagger:strfmt date-time
  16. Created time.Time `json:"created_at"`
  17. // swagger:strfmt date-time
  18. Updated *time.Time `json:"updated_at"`
  19. // swagger:strfmt date-time
  20. Closed *time.Time `json:"closed_at"`
  21. // swagger:strfmt date-time
  22. Deadline *time.Time `json:"due_on"`
  23. }
  24. // CreateMilestoneOption options for creating a milestone
  25. type CreateMilestoneOption struct {
  26. Title string `json:"title"`
  27. Description string `json:"description"`
  28. // swagger:strfmt date-time
  29. Deadline *time.Time `json:"due_on"`
  30. // enum: open,closed
  31. State string `json:"state"`
  32. }
  33. // EditMilestoneOption options for editing a milestone
  34. type EditMilestoneOption struct {
  35. Title string `json:"title"`
  36. Description *string `json:"description"`
  37. State *string `json:"state"`
  38. Deadline *time.Time `json:"due_on"`
  39. }