making progress

This commit is contained in:
2026-05-07 02:06:54 +02:00
parent 7b7e2d399c
commit dea186c995
39 changed files with 2021 additions and 67 deletions
+22
View File
@@ -0,0 +1,22 @@
package models
import "time"
type IssueState string
const (
IssueStateOpen IssueState = "open"
IssueStateClosed IssueState = "closed"
)
type Issue struct {
ID int64 `xorm:"'id' pk autoincr" json:"id"`
RepoID int64 `xorm:"'repo_id' notnull index" json:"repoId"`
AuthorID int64 `xorm:"'author_id' notnull index" json:"authorId"`
Number int `xorm:"'number' notnull" json:"number"`
Title string `xorm:"'title' notnull varchar(255)" json:"title"`
Body string `xorm:"'body' text" json:"body"`
State IssueState `xorm:"'state' default 'open' varchar(16)" json:"state"`
CreatedAt time.Time `xorm:"'created_at' created" json:"createdAt"`
UpdatedAt time.Time `xorm:"'updated_at' updated" json:"updatedAt"`
}