移除sqlx
This commit is contained in:
		
							
								
								
									
										30
									
								
								api/image.go
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								api/image.go
									
									
									
									
									
								
							@@ -19,22 +19,22 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Image struct {
 | 
			
		||||
	ID           int       `json:"id"            db:"id" gorm:"primaryKey"`
 | 
			
		||||
	Width        int       `json:"width"         db:"width"`
 | 
			
		||||
	Height       int       `json:"height"        db:"height"`
 | 
			
		||||
	Content      string    `json:"content"       db:"content"`
 | 
			
		||||
	Remark       string    `json:"remark"        db:"remark"`
 | 
			
		||||
	Description  string    `json:"description"   db:"description"`
 | 
			
		||||
	Tags         string    `json:"tags"          db:"tags"`
 | 
			
		||||
	Rank         string    `json:"rank"          db:"rank"`
 | 
			
		||||
	CommentNum   int       `json:"comment_num"   db:"comment_num"`
 | 
			
		||||
	ID           int       `json:"id" gorm:"primaryKey"`
 | 
			
		||||
	Width        int       `json:"width"`
 | 
			
		||||
	Height       int       `json:"height"`
 | 
			
		||||
	Content      string    `json:"content"`
 | 
			
		||||
	Remark       string    `json:"remark"`
 | 
			
		||||
	Description  string    `json:"description"`
 | 
			
		||||
	Tags         string    `json:"tags"`
 | 
			
		||||
	Rank         string    `json:"rank"`
 | 
			
		||||
	CommentNum   int       `json:"comment_num"`
 | 
			
		||||
	PraiseCount  int       `json:"praise_count" gorm:"column:praise"`
 | 
			
		||||
	CollectCount int       `json:"collect_count" db:"collect_count"`
 | 
			
		||||
	ArticleID    int       `json:"article_id"    db:"article_id"`
 | 
			
		||||
	UserID       int       `json:"user_id"       db:"user_id"`
 | 
			
		||||
	CreateTime   time.Time `json:"create_time"   db:"create_time"`
 | 
			
		||||
	UpdateTime   time.Time `json:"update_time"   db:"update_time"`
 | 
			
		||||
	Text         TextList  `json:"text"          db:"text" gorm:"type:json"`
 | 
			
		||||
	CollectCount int       `json:"collect_count"`
 | 
			
		||||
	ArticleID    int       `json:"article_id"`
 | 
			
		||||
	UserID       int       `json:"user_id"`
 | 
			
		||||
	CreateTime   time.Time `json:"create_time"`
 | 
			
		||||
	UpdateTime   time.Time `json:"update_time"`
 | 
			
		||||
	Text         TextList  `json:"text" gorm:"type:json"`
 | 
			
		||||
	User         User      `json:"user" gorm:"foreignKey:UserID"`
 | 
			
		||||
	Article      Article   `json:"article" gorm:"foreignKey:ArticleID"`
 | 
			
		||||
	Activity     bool      `json:"activity"`
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user