Files
2026-05-07 02:06:54 +02:00

23 lines
886 B
Go

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"`
}