gitea源码

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. // username of the user who spent the time working on the issue (optional)
  15. User string `json:"user_name"`
  16. }
  17. // TrackedTime worked time for an issue / pr
  18. type TrackedTime struct {
  19. // ID is the unique identifier for the tracked time entry
  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 of the user
  28. UserName string `json:"user_name"`
  29. // deprecated (only for backwards compatibility)
  30. IssueID int64 `json:"issue_id"`
  31. // Issue contains the associated issue information
  32. Issue *Issue `json:"issue"`
  33. }
  34. // TrackedTimeList represents a list of tracked times
  35. type TrackedTimeList []*TrackedTime