Files
agent/backend/internal/models/dataset_item.go

27 lines
925 B
Go

package models
import "time"
type SaDatasetItem struct {
ID uint `gorm:"primaryKey"`
Identity string `gorm:"type:char(36);uniqueIndex"`
SourceID uint `gorm:"index;not null"`
SourceIdentity string `gorm:"type:char(36);index"`
CreatedBy uint `gorm:"index;not null"`
CreatedByIdentity string `gorm:"type:char(36);index"`
ExternalID *string `gorm:"size:64;index"`
Title string `gorm:"size:500;not null"`
Summary string `gorm:"type:text"`
Content string `gorm:"type:text"`
URL string `gorm:"size:2048"`
Status string `gorm:"size:32;not null;default:unread;index"`
Starred bool `gorm:"not null;default:false;index"`
PublishedAt *time.Time
CreatedAt time.Time
UpdatedAt time.Time
}
func (SaDatasetItem) TableName() string {
return "sa_dataset_items"
}