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_tracked_time.go 964B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import (
  5. "time"
  6. )
  7. // AddTimeOption options for adding time to an issue
  8. type AddTimeOption struct {
  9. // time in seconds
  10. // required: true
  11. Time int64 `json:"time" binding:"Required"`
  12. // swagger:strfmt date-time
  13. Created time.Time `json:"created"`
  14. // User who spent the time (optional)
  15. User string `json:"user_name"`
  16. }
  17. // TrackedTime worked time for an issue / pr
  18. type TrackedTime struct {
  19. ID int64 `json:"id"`
  20. // swagger:strfmt date-time
  21. Created time.Time `json:"created"`
  22. // Time in seconds
  23. Time int64 `json:"time"`
  24. // deprecated (only for backwards compatibility)
  25. UserID int64 `json:"user_id"`
  26. UserName string `json:"user_name"`
  27. // deprecated (only for backwards compatibility)
  28. IssueID int64 `json:"issue_id"`
  29. Issue *Issue `json:"issue"`
  30. }
  31. // TrackedTimeList represents a list of tracked times
  32. type TrackedTimeList []*TrackedTime