narasiahli-be/app/database/entity/knowledge_base.entity.go

29 lines
955 B
Go
Raw Normal View History

2026-01-14 01:29:35 +00:00
package entity
import (
"time"
)
type KnowledgeBase struct {
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
AgentId *string `json:"agent_id" gorm:"type:varchar"`
AgentName *string `json:"agent_name" gorm:"type:varchar"`
CreatedById uint `json:"created_by_id" gorm:"type:int4;not null"`
Status int `json:"status" gorm:"type:int4;default:0"` // 0=wating,1=approved,2=reject
2026-01-15 06:59:03 +00:00
DocumentId int `json:"documentId" gorm:"column:document_id;type:int4;not null;default:0"`
2026-01-14 01:29:35 +00:00
Title *string `json:"title" gorm:"type:varchar"`
FileJournalUrl *string `json:"file_journal_url" gorm:"type:varchar"`
FileAudioUrl *string `json:"file_audio_url" gorm:"type:varchar"`
FileVideoUrl *string `json:"file_video_url" gorm:"type:varchar"`
IsActive bool `json:"is_active" gorm:"type:bool;default:true"`
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
2026-01-15 06:59:03 +00:00
2026-01-14 01:29:35 +00:00
}