code.gitea.io/gitea@v1.19.3/modules/structs/issue_tracked_time.go (about)

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