pejhancctv/models/comments.go

17 lines
416 B
Go

package models
import "time"
type Comment struct {
Comment_id uint `gorm:"primaryKey"`
User_id uint
User User `gorm:"references:User_id"`
Product_id uint
Product Product `gorm:"references:Product_id"`
Content string `gorm:"type:TEXT"`
Created_at time.Time
Updated_at time.Time `gorm:"default:null"`
Removed_at time.Time `gorm:"default:null"`
Is_removed bool `gorm:"default:false"`
}