File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ func Init() {
9999 Cfg .Site .DevMode = Cfg .Server .Devmode
100100
101101 if Cfg .TLS .Enabled {
102- Cfg .TLS .Cert = path .Join (path . Join ( models .Default_Data_Path , Cfg .TLS .Cert ) )
102+ Cfg .TLS .Cert = path .Join (models .Default_Data_Path , Cfg .TLS .Cert )
103103 Cfg .TLS .Key = path .Join (models .Default_Data_Path , Cfg .TLS .Key )
104104 }
105105
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ type ArticleSummary struct {
66 Title string `json:"title" gorm:"primaryKey"`
77 UpdateAt * time.Time `json:"updateAt" gorm:"autoUpdateTime;"`
88 Category string `json:"category"`
9- Summary string `json:"summary"`
9+ Summary string `json:"summary" gorm:"type:TEXT" `
1010}
1111
1212type ArticleDetail struct {
1313 Title string `json:"title" gorm:"primaryKey"`
1414 CreateAt * time.Time `json:"createAt" gorm:"autoCreateTime;"`
1515 UpdateAt * time.Time `json:"updateAt" gorm:"autoUpdateTime;"`
16- Author string `json:"author"`
16+ Author string `json:"author" gorm:"type:VARCHAR(100)" `
1717 Content string `json:"content" gorm:"type:TEXT;index:ft_content,fulltext"`
1818}
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ type Comment struct {
88 CommentUser string `json:"comment_user" gorm:"type:varchar(100)"`
99 CommentTo int `json:"comment_to_order" gorm:"type:int"`
1010 CommentRoot int `json:"comment_root" gorm:"type:int"`
11- Title string `json:"title" gorm:"index"` // 关联文章标题
11+ Title string `json:"title" gorm:"type:varchar(100); index"` // 关联文章标题
1212 Order int `json:"order" gorm:"default:0"`
1313 CreatedAt * time.Time `json:"created_at" gorm:"autoCreateTime;"`
1414}
You can’t perform that action at this time.
0 commit comments