medol-be/app/database/entity/article_comments.entity.go

16 lines
627 B
Go
Raw Normal View History

package entity
import "time"
type ArticleComments struct {
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
Message string `json:"message" gorm:"type:varchar"`
ArticleId uint `json:"article_id" gorm:"type:int4"`
CommentFrom *uint `json:"comment_from" gorm:"type:int4"`
ParentId *int `json:"parent_id" gorm:"type:int4"`
IsPublic bool `json:"is_public" gorm:"type:bool"`
IsActive bool `json:"is_active" gorm:"type:bool"`
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
}