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 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2017 The Gitea 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. // AddTimeOption options for adding time to an issue
  9. type AddTimeOption struct {
  10. // time in seconds
  11. // required: true
  12. Time int64 `json:"time" binding:"Required"`
  13. // swagger:strfmt date-time
  14. Created time.Time `json:"created"`
  15. // User who spent the time (optional)
  16. User string `json:"user_name"`
  17. }
  18. // TrackedTime worked time for an issue / pr
  19. type TrackedTime struct {
  20. ID int64 `json:"id"`
  21. // swagger:strfmt date-time
  22. Created time.Time `json:"created"`
  23. // Time in seconds
  24. Time int64 `json:"time"`
  25. // deprecated (only for backwards compatibility)
  26. UserID int64 `json:"user_id"`
  27. UserName string `json:"user_name"`
  28. // deprecated (only for backwards compatibility)
  29. IssueID int64 `json:"issue_id"`
  30. Issue *Issue `json:"issue"`
  31. }
  32. // TrackedTimeList represents a list of tracked times
  33. type TrackedTimeList []*TrackedTime