Skip to content

Commit c788b3d

Browse files
Model changes to support attachments in apis
1 parent 87bcd3b commit c788b3d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

models/attachment.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121

2222
// Attachment represent a attachment of issue/comment/release.
2323
type Attachment struct {
24-
ID int64 `xorm:"pk autoincr"`
25-
UUID string `xorm:"uuid UNIQUE"`
26-
IssueID int64 `xorm:"INDEX"`
27-
ReleaseID int64 `xorm:"INDEX"`
24+
ID int64 `xorm:"pk autoincr"`
25+
UUID string `xorm:"uuid UNIQUE"`
26+
IssueID int64 `xorm:"INDEX"`
27+
ReleaseID int64 `xorm:"INDEX"`
2828
CommentID int64
2929
Name string
3030
DownloadCount int64 `xorm:"DEFAULT 0"`

models/release.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ type Release struct {
2828
LowerTagName string
2929
Target string
3030
Title string
31-
Sha1 string `xorm:"VARCHAR(40)"`
31+
Sha1 string `xorm:"VARCHAR(40)"`
3232
NumCommits int64
33-
NumCommitsBehind int64 `xorm:"-"`
34-
Note string `xorm:"TEXT"`
35-
IsDraft bool `xorm:"NOT NULL DEFAULT false"`
36-
IsPrerelease bool `xorm:"NOT NULL DEFAULT false"`
37-
IsTag bool `xorm:"NOT NULL DEFAULT false"`
33+
NumCommitsBehind int64 `xorm:"-"`
34+
Note string `xorm:"TEXT"`
35+
IsDraft bool `xorm:"NOT NULL DEFAULT false"`
36+
IsPrerelease bool `xorm:"NOT NULL DEFAULT false"`
37+
IsTag bool `xorm:"NOT NULL DEFAULT false"`
3838

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

0 commit comments

Comments
 (0)