From d18ba41fab957e135fe10c4e2d43051e620cd0e5 Mon Sep 17 00:00:00 2001 From: raisons Date: Tue, 5 Dec 2023 09:28:59 +0800 Subject: [PATCH] fix: set likes field default value --- model/entity/comment.gen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/entity/comment.gen.go b/model/entity/comment.gen.go index 779d132..b6a40bf 100644 --- a/model/entity/comment.gen.go +++ b/model/entity/comment.gen.go @@ -31,7 +31,7 @@ type Comment struct { Status consts.CommentStatus `gorm:"column:status;type:bigint;not null;index:comment_type_status,priority:2" json:"status"` TopPriority int32 `gorm:"column:top_priority;type:int;not null" json:"top_priority"` UserAgent string `gorm:"column:user_agent;type:varchar(511);not null" json:"user_agent"` - Likes int32 `gorm:"column:likes;type:int;not null" json:"likes"` + Likes int32 `gorm:"column:likes;type:int;not null;default: 0" json:"likes"` } // TableName Comment's table name