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;default:false"`
	StatusId    int        `json:"status_id" gorm:"type:int4;default:0"`
	ApprovedAt  *time.Time `json:"approved_at" gorm:"type:timestamp"`
	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()"`
}

// statusId => 0: waiting, 1: accepted, 2: replied, 3: rejected
