code.gitea.io/gitea@v1.19.3/modules/structs/issue_milestone.go (about) 1 // Copyright 2016 The Gogs Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package structs 5 6 import ( 7 "time" 8 ) 9 10 // Milestone milestone is a collection of issues on one repository 11 type Milestone struct { 12 ID int64 `json:"id"` 13 Title string `json:"title"` 14 Description string `json:"description"` 15 State StateType `json:"state"` 16 OpenIssues int `json:"open_issues"` 17 ClosedIssues int `json:"closed_issues"` 18 // swagger:strfmt date-time 19 Created time.Time `json:"created_at"` 20 // swagger:strfmt date-time 21 Updated *time.Time `json:"updated_at"` 22 // swagger:strfmt date-time 23 Closed *time.Time `json:"closed_at"` 24 // swagger:strfmt date-time 25 Deadline *time.Time `json:"due_on"` 26 } 27 28 // CreateMilestoneOption options for creating a milestone 29 type CreateMilestoneOption struct { 30 Title string `json:"title"` 31 Description string `json:"description"` 32 // swagger:strfmt date-time 33 Deadline *time.Time `json:"due_on"` 34 // enum: open,closed 35 State string `json:"state"` 36 } 37 38 // EditMilestoneOption options for editing a milestone 39 type EditMilestoneOption struct { 40 Title string `json:"title"` 41 Description *string `json:"description"` 42 State *string `json:"state"` 43 Deadline *time.Time `json:"due_on"` 44 }