caipin 4 years ago
parent
commit
7061536c5d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/cm_annex.go

+ 1 - 1
models/cm_annex.go

@@ -11,6 +11,6 @@ type CmAnnex struct {
 	AccountId  int       `xorm:"not null default 0 comment('账号ID') INT(11)"`
 	Name       string    `xorm:"comment('附件名称') VARCHAR(64)"`
 	OssUrl     string    `xorm:"comment('访问路径') VARCHAR(255)"`
-	CreateTime time.Time `xorm:"comment('创建时间') DATETIME"`
+	CreateTime time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') TIMESTAMP"`
 	UpdateTime time.Time `xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') TIMESTAMP"`
 }