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

21 lines
785 B
Go
Raw Normal View History

2026-02-01 16:11:03 +00:00
package entity
import (
userAgent "narasi-ahli-be/app/database/entity/user_agent"
"time"
)
2026-02-01 16:11:03 +00:00
type Agent struct {
ID uint `gorm:"primaryKey" json:"id"`
AgentID string `gorm:"type:varchar(100);uniqueIndex" json:"agent_id"`
Name string `gorm:"type:varchar(255)" json:"name"`
Description string `gorm:"type:text" json:"description"`
Instructions string `gorm:"type:text" json:"instructions"`
Type string `gorm:"type:varchar(100)" json:"type"`
Status bool `gorm:"default:true" json:"status"`
IsActive bool `gorm:"default:true" json:"is_active"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
UserAgents []*userAgent.UserAgent `gorm:"foreignKey:AgentID"`
2026-02-01 16:11:03 +00:00
}