File tree Expand file tree Collapse file tree 3 files changed +81
-0
lines changed Expand file tree Collapse file tree 3 files changed +81
-0
lines changed Original file line number Diff line number Diff line change 1+ // models/kanban.go
2+ package models
3+
4+ type KanbanBoard struct {
5+ ID int64 `xorm:"pk autoincr"`
6+ RepoID int64 `xorm:"INDEX NOT NULL"`
7+ Title string `xorm:"NOT NULL"`
8+ CreatedAt int64 `xorm:"created"`
9+ UpdatedAt int64 `xorm:"updated"`
10+ }
11+
12+ type KanbanColumn struct {
13+ ID int64 `xorm:"pk autoincr"`
14+ BoardID int64 `xorm:"INDEX NOT NULL"`
15+ Title string `xorm:"NOT NULL"`
16+ Order int `xorm:"NOT NULL DEFAULT 0"`
17+ CreatedAt int64 `xorm:"created"`
18+ UpdatedAt int64 `xorm:"updated"`
19+ }
20+
21+ type KanbanCard struct {
22+ ID int64 `xorm:"pk autoincr"`
23+ ColumnID int64 `xorm:"INDEX NOT NULL"`
24+ IssueID int64 `xorm:"INDEX"`
25+ Title string `xorm:"NOT NULL"`
26+ Description string `xorm:"TEXT"`
27+ Order int `xorm:"NOT NULL DEFAULT 0"`
28+ CreatedAt int64 `xorm:"created"`
29+ UpdatedAt int64 `xorm:"updated"`
30+ }
Original file line number Diff line number Diff line change 1+ module kanban
2+
3+ go 1.24rc3
Original file line number Diff line number Diff line change 1+ package kanban
2+
3+ import (
4+ "code.gitea.io/gitea/modules/log"
5+ "code.gitea.io/gitea/modules/setting"
6+ "code.gitea.io/gitea/routers"
7+ "code.gitea.io/sdk/gitea"
8+ )
9+
10+ // Plugin represents a Gitea plugin
11+ type Plugin struct {
12+ Name string
13+ Description string
14+ Version string
15+ }
16+
17+ // Init initializes the plugin
18+ func (p * Plugin ) Init () error {
19+ log .Info ("Kanban plugin initialized" )
20+
21+ // Register routes
22+ routers .Register ("GET" , "/api/v1/repos/:username/:reponame/kanban" , GetKanbanHandler )
23+ routers .Register ("POST" , "/api/v1/repos/:username/:reponame/kanban" , CreateKanbanHandler )
24+
25+ // Register templates
26+ // Add UI components
27+
28+ return nil
29+ }
30+
31+ func main () {
32+ plugin := & Plugin {
33+ Name : "Kanban Board" ,
34+ Description : "A Kanban board for Gitea projects" ,
35+ Version : "1.0.0" ,
36+ }
37+
38+ gitea .RegisterPlugin (plugin )
39+ }
40+
41+ // Handler functions
42+ func GetKanbanHandler (ctx * context.Context ) {
43+ // Implementation
44+ }
45+
46+ func CreateKanbanHandler (ctx * context.Context ) {
47+ // Implementation
48+ }
You can’t perform that action at this time.
0 commit comments