mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-23 03:25:18 +00:00
refactor: add structs for project
This commit is contained in:
parent
4c0ec221fa
commit
6092b81563
40
modules/structs/project.go
Normal file
40
modules/structs/project.go
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright 2023 The Gitea Authors. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
package structs
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type NewProjectPayload struct {
|
||||||
|
// required:true
|
||||||
|
Title string `json:"title" binding:"Required"`
|
||||||
|
// required:true
|
||||||
|
BoardType uint8 `json:"board_type"`
|
||||||
|
// required:true
|
||||||
|
CardType uint8 `json:"card_type"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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"`
|
||||||
|
Owner *User `json:"owner"`
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user