Skip to content

Commit

Permalink
Model changes to support attachments in apis
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-lacatus committed Dec 3, 2017
1 parent 87bcd3b commit c788b3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions models/attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (

// Attachment represent a attachment of issue/comment/release.
type Attachment struct {
ID int64 `xorm:"pk autoincr"`
UUID string `xorm:"uuid UNIQUE"`
IssueID int64 `xorm:"INDEX"`
ReleaseID int64 `xorm:"INDEX"`
ID int64 `xorm:"pk autoincr"`
UUID string `xorm:"uuid UNIQUE"`
IssueID int64 `xorm:"INDEX"`
ReleaseID int64 `xorm:"INDEX"`
CommentID int64
Name string
DownloadCount int64 `xorm:"DEFAULT 0"`
Expand Down
12 changes: 6 additions & 6 deletions models/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ type Release struct {
LowerTagName string
Target string
Title string
Sha1 string `xorm:"VARCHAR(40)"`
Sha1 string `xorm:"VARCHAR(40)"`
NumCommits int64
NumCommitsBehind int64 `xorm:"-"`
Note string `xorm:"TEXT"`
IsDraft bool `xorm:"NOT NULL DEFAULT false"`
IsPrerelease bool `xorm:"NOT NULL DEFAULT false"`
IsTag bool `xorm:"NOT NULL DEFAULT false"`
NumCommitsBehind int64 `xorm:"-"`
Note string `xorm:"TEXT"`
IsDraft bool `xorm:"NOT NULL DEFAULT false"`
IsPrerelease bool `xorm:"NOT NULL DEFAULT false"`
IsTag bool `xorm:"NOT NULL DEFAULT false"`

Attachments []*Attachment `xorm:"-"`

Expand Down

0 comments on commit c788b3d

Please sign in to comment.