|
|
@@ -28,19 +28,19 @@ const ( |
|
|
|
|
|
|
|
// 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"` |
|
|
|
DatasetID int64 `xorm:"INDEX DEFAULT 0"` |
|
|
|
ReleaseID int64 `xorm:"INDEX"` |
|
|
|
UploaderID int64 `xorm:"INDEX DEFAULT 0"` // Notice: will be zero before this column added |
|
|
|
CommentID int64 |
|
|
|
Name string |
|
|
|
DownloadCount int64 `xorm:"DEFAULT 0"` |
|
|
|
Size int64 `xorm:"DEFAULT 0"` |
|
|
|
IsPrivate bool `xorm:"DEFAULT false"` |
|
|
|
DecompressState int32 `xorm:"DEFAULT 0"` |
|
|
|
CreatedUnix timeutil.TimeStamp `xorm:"created"` |
|
|
|
ID int64 `xorm:"pk autoincr"` |
|
|
|
UUID string `xorm:"uuid UNIQUE"` |
|
|
|
IssueID int64 `xorm:"INDEX"` |
|
|
|
DatasetID int64 `xorm:"INDEX DEFAULT 0"` |
|
|
|
ReleaseID int64 `xorm:"INDEX"` |
|
|
|
UploaderID int64 `xorm:"INDEX DEFAULT 0"` // Notice: will be zero before this column added |
|
|
|
CommentID int64 |
|
|
|
Name string |
|
|
|
DownloadCount int64 `xorm:"DEFAULT 0"` |
|
|
|
Size int64 `xorm:"DEFAULT 0"` |
|
|
|
IsPrivate bool `xorm:"DEFAULT false"` |
|
|
|
DecompressState int32 `xorm:"DEFAULT 0"` |
|
|
|
CreatedUnix timeutil.TimeStamp `xorm:"created"` |
|
|
|
} |
|
|
|
|
|
|
|
func (a *Attachment) AfterUpdate() { |
|
|
|