From 83e61aad76b8121b5cb10ea9b45d6fd3b4428b96 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 6 Jun 2022 15:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/attachment.go | 5 +++-- models/dataset.go | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/models/attachment.go b/models/attachment.go index ea8f1645f..a93082bf0 100755 --- a/models/attachment.go +++ b/models/attachment.go @@ -41,8 +41,9 @@ type Attachment struct { UploaderID int64 `xorm:"INDEX DEFAULT 0"` // Notice: will be zero before this column added CommentID int64 Name string - Description string `xorm:"TEXT"` - DownloadCount int64 `xorm:"DEFAULT 0"` + Description string `xorm:"TEXT"` + DownloadCount int64 `xorm:"DEFAULT 0"` + UseCount int64 Size int64 `xorm:"DEFAULT 0"` IsPrivate bool `xorm:"DEFAULT false"` DecompressState int32 `xorm:"DEFAULT 0"` diff --git a/models/dataset.go b/models/dataset.go index d4a7748d3..baf7731e4 100755 --- a/models/dataset.go +++ b/models/dataset.go @@ -25,6 +25,7 @@ type Dataset struct { Category string Description string `xorm:"TEXT"` DownloadTimes int64 + UseCount int64 NumStars int `xorm:"INDEX NOT NULL DEFAULT 0"` Recommend bool `xorm:"INDEX NOT NULL DEFAULT false"` License string