channel.go 895 B

123456789101112131415161718
  1. package model
  2. import "time"
  3. type Channel struct {
  4. ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
  5. Username string `gorm:"uniqueIndex;size:255;not null" json:"username"`
  6. Title string `gorm:"size:500" json:"title"`
  7. MemberCount int `gorm:"default:0" json:"member_count"`
  8. About string `gorm:"type:text" json:"about"`
  9. Source string `gorm:"type:enum('seed','snowball','search','github');not null;index" json:"source"`
  10. SourceDetail string `gorm:"size:500" json:"source_detail"`
  11. Status string `gorm:"type:enum('pending','scraped','failed','skipped');default:'pending';index" json:"status"`
  12. LastMessageID int `gorm:"default:0" json:"last_message_id"`
  13. RelevanceScore float64 `json:"relevance_score"`
  14. CreatedAt time.Time `json:"created_at"`
  15. UpdatedAt time.Time `json:"updated_at"`
  16. }