15 lines
541 B
Go
15 lines
541 B
Go
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"`
|
|
}
|