article.go 885 B

1234567891011121314151617181920212223242526272829
  1. package models
  2. import (
  3. "database/sql"
  4. "time"
  5. )
  6. type ArticlePreview struct {
  7. ID uint64 `db:"id"`
  8. URL string `db:"url"`
  9. Title string `db:"title"`
  10. Image string `db:"image"`
  11. PreviewText sql.NullString `db:"preview_text"`
  12. PublishTime time.Time `db:"publish_time"`
  13. }
  14. type Article struct {
  15. ID uint64 `db:"id"`
  16. URL string `db:"url"`
  17. Title string `db:"title"`
  18. Image string `db:"image"`
  19. Text string `db:"text"`
  20. PublishTime time.Time `db:"publish_time"`
  21. PreviewText sql.NullString `db:"preview_text"`
  22. MetaKeywords sql.NullString `db:"meta_keywords"`
  23. MetaDescription sql.NullString `db:"meta_desc"`
  24. Language LanguageID `db:"language"`
  25. IsActive bool `db:"is_active"`
  26. }