Files
request/gitea/structs/issue_tracked_time.go
Matheus Sampaio Queiroga 520d37c408
All checks were successful
Golang test / go-test (push) Successful in 26s
Add Gitea and Github basic clients
2025-04-02 22:31:24 -03:00

36 lines
912 B
Go

// Copyright 2017 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
import (
"time"
)
// AddTimeOption options for adding time to an issue
type AddTimeOption struct {
// time in seconds
// required: true
Time int `json:"time" binding:"Required"`
Created time.Time `json:"created"`
// User who spent the time (optional)
User string `json:"user_name"`
}
// TrackedTime worked time for an issue / pr
type TrackedTime struct {
ID int `json:"id"`
Created time.Time `json:"created"`
// Time in seconds
Time int `json:"time"`
// deprecated (only for backwards compatibility)
UserID int `json:"user_id"`
UserName string `json:"user_name"`
// deprecated (only for backwards compatibility)
IssueID int `json:"issue_id"`
Issue *Issue `json:"issue"`
}
// TrackedTimeList represents a list of tracked times
type TrackedTimeList []*TrackedTime