26 lines
931 B
Go
26 lines
931 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;uniqueIndex:idx_sa_dataset_item_source_external,priority:1"`
|
|
SourceIdentity string `gorm:"type:char(36);index"`
|
|
ExternalID *string `gorm:"size:64;uniqueIndex:idx_sa_dataset_item_source_external,priority:2"`
|
|
Title string `gorm:"size:500;not null"`
|
|
Summary string `gorm:"type:text"`
|
|
Content string `gorm:"type:text"`
|
|
URL string `gorm:"size:2048"`
|
|
ImageURL 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"
|
|
}
|