Finish upgrade the gorm framework.

This commit is contained in:
lishuang
2022-03-15 02:17:26 +08:00
parent 69412300b6
commit 161096fbb2
19 changed files with 167 additions and 187 deletions

View File

@ -1,12 +1,14 @@
package rest
import (
"github.com/eyebluecn/tank/code/core"
"time"
)
type UploadToken struct {
Base
Uuid string `json:"uuid" gorm:"type:char(36);primary_key;unique"`
Sort int64 `json:"sort" gorm:"type:bigint(20) not null"`
UpdateTime time.Time `json:"updateTime" gorm:"type:timestamp not null;default:CURRENT_TIMESTAMP"`
CreateTime time.Time `json:"createTime" gorm:"type:timestamp not null;default:'2018-01-01 00:00:00'"`
UserUuid string `json:"userUuid" gorm:"type:char(36) not null"`
FolderUuid string `json:"folderUuid" gorm:"type:char(36) not null"`
MatterUuid string `json:"matterUuid" gorm:"type:char(36) not null"`
@ -16,7 +18,3 @@ type UploadToken struct {
Size int64 `json:"size" gorm:"type:bigint(20) not null;default:0"`
Ip string `json:"ip" gorm:"type:varchar(128) not null"`
}
func (this *UploadToken) TableName() string {
return core.TABLE_PREFIX + "upload_token"
}