package model import "time" type User struct { ID int64 `json:"id"` Email string `json:"email"` Username string `json:"username"` IsAdmin bool `json:"is_admin"` } type Repository struct { ID int64 `json:"id"` OwnerUserID int64 `json:"-"` Owner string `json:"owner"` Name string `json:"name"` Visibility string `json:"visibility"` Description string `json:"description"` DefaultBranch string `json:"default_branch"` Archived bool `json:"archived"` ForkedFromID *int64 `json:"forked_from_id,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } type PullRequest struct { ID int64 `json:"id"` Number int `json:"number"` TargetRepositoryID int64 `json:"-"` SourceRepositoryID int64 `json:"-"` AuthorUserID int64 `json:"-"` Author string `json:"author"` SourceOwner string `json:"source_owner"` SourceRepo string `json:"source_repo"` SourceBranch string `json:"source_branch"` TargetOwner string `json:"target_owner"` TargetRepo string `json:"target_repo"` TargetBranch string `json:"target_branch"` Title string `json:"title"` Description string `json:"description"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` ClosedAt *time.Time `json:"closed_at,omitempty"` MergedAt *time.Time `json:"merged_at,omitempty"` } type ServerConfig struct { Addr string `json:"addr"` PublicURL string `json:"public_url"` Storage string `json:"storage"` MySQLDSN string `json:"mysql_dsn"` } type RefInfo struct { Name string `json:"name"` Commit string `json:"commit"` Date time.Time `json:"date"` Message string `json:"message"` } type Collaborator struct { ID int64 `json:"id"` Username string `json:"username"` Role string `json:"role"` CreatedAt time.Time `json:"created_at"` } type PRComment struct { ID int64 `json:"id"` Author string `json:"author"` Body string `json:"body"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } type TokenInfo struct { ID int64 `json:"id"` CreatedAt time.Time `json:"created_at"` ExpiresAt time.Time `json:"expires_at"` RevokedAt *time.Time `json:"revoked_at,omitempty"` Active bool `json:"active"` } type Config struct { Server string `json:"server"` Username string `json:"username"` Token string `json:"token"` ExpiresAt time.Time `json:"expires_at"` }