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

15 lines
541 B
Go
Raw Normal View History

2025-09-19 04:08:42 +00:00
package entity
import (
"time"
)
type AIChatMessages struct {
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
SessionID uint `json:"session_id" gorm:"type:int4;not null;index"`
MessageType string `json:"message_type" gorm:"type:varchar;not null"`
Content string `json:"content" gorm:"type:text;not null"`
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
Session *AIChatSessions `json:"session" gorm:"foreignKey:SessionID;references:ID"`
}