gitea源码

issue_milestone.go 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 is the unique identifier for the milestone
  10. ID int64 `json:"id"`
  11. // Title is the title of the milestone
  12. Title string `json:"title"`
  13. // Description provides details about the milestone
  14. Description string `json:"description"`
  15. // State indicates if the milestone is open or closed
  16. State StateType `json:"state"`
  17. // OpenIssues is the number of open issues in this milestone
  18. OpenIssues int `json:"open_issues"`
  19. // ClosedIssues is the number of closed issues in this milestone
  20. ClosedIssues int `json:"closed_issues"`
  21. // swagger:strfmt date-time
  22. Created time.Time `json:"created_at"`
  23. // swagger:strfmt date-time
  24. Updated *time.Time `json:"updated_at"`
  25. // swagger:strfmt date-time
  26. Closed *time.Time `json:"closed_at"`
  27. // swagger:strfmt date-time
  28. Deadline *time.Time `json:"due_on"`
  29. }
  30. // CreateMilestoneOption options for creating a milestone
  31. type CreateMilestoneOption struct {
  32. // Title is the title of the new milestone
  33. Title string `json:"title"`
  34. // Description provides details about the milestone
  35. Description string `json:"description"`
  36. // swagger:strfmt date-time
  37. // Deadline is the due date for the milestone
  38. Deadline *time.Time `json:"due_on"`
  39. // enum: open,closed
  40. // State indicates the initial state of the milestone
  41. State string `json:"state"`
  42. }
  43. // EditMilestoneOption options for editing a milestone
  44. type EditMilestoneOption struct {
  45. // Title is the updated title of the milestone
  46. Title string `json:"title"`
  47. // Description provides updated details about the milestone
  48. Description *string `json:"description"`
  49. // State indicates the updated state of the milestone
  50. State *string `json:"state"`
  51. // Deadline is the updated due date for the milestone
  52. Deadline *time.Time `json:"due_on"`
  53. }