forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.go
68 lines (59 loc) · 1.69 KB
/
project.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package structs
import "time"
// swagger:model
type NewProjectPayload struct {
// required:true
Title string `json:"title" binding:"Required"`
// required:true
BoardType uint8 `json:"board_type"`
Description string `json:"description"`
}
// swagger:model
type UpdateProjectPayload struct {
// required:true
Title string `json:"title" binding:"Required"`
Description string `json:"description"`
}
type Project struct {
ID int64 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
BoardType uint8 `json:"board_type"`
IsClosed bool `json:"is_closed"`
// swagger:strfmt date-time
Created time.Time `json:"created_at"`
// swagger:strfmt date-time
Updated time.Time `json:"updated_at"`
// swagger:strfmt date-time
Closed time.Time `json:"closed_at"`
Repo *RepositoryMeta `json:"repository"`
Creator *User `json:"creator"`
}
type ProjectBoard struct {
ID int64 `json:"id"`
Title string `json:"title"`
Default bool `json:"default"`
Color string `json:"color"`
Sorting int8 `json:"sorting"`
Project *Project `json:"project"`
Creator *User `json:"creator"`
// swagger:strfmt date-time
Created time.Time `json:"created_at"`
// swagger:strfmt date-time
Updated time.Time `json:"updated_at"`
}
// swagger:model
type NewProjectBoardPayload struct {
// required:true
Title string `json:"title"`
Default bool `json:"default"`
Color string `json:"color"`
Sorting int8 `json:"sorting"`
}
// swagger:model
type UpdateProjectBoardPayload struct {
Title string `json:"title"`
Color string `json:"color"`
}