merchant_archived.go 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. package model
  2. import (
  3. "time"
  4. "gorm.io/datatypes"
  5. )
  6. // MerchantArchived stores archived merchants.
  7. type MerchantArchived struct {
  8. ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
  9. OriginalID uint `json:"original_id"`
  10. TgUsername string `gorm:"size:255;index" json:"tg_username"`
  11. TgLink string `gorm:"size:500" json:"tg_link"`
  12. MerchantName string `gorm:"size:500" json:"merchant_name"`
  13. Website string `gorm:"size:2048" json:"website"`
  14. Email string `gorm:"size:255" json:"email"`
  15. Phone string `gorm:"size:100" json:"phone"`
  16. SourceCount int `gorm:"default:1" json:"source_count"`
  17. AllSources datatypes.JSON `gorm:"type:json" json:"all_sources"`
  18. IndustryTag string `gorm:"size:100" json:"industry_tag"`
  19. Level string `gorm:"size:10" json:"level"`
  20. Status string `gorm:"size:20" json:"status"`
  21. FollowStatus string `gorm:"size:20" json:"follow_status"`
  22. AssignedTo string `gorm:"size:50" json:"assigned_to"`
  23. Remark string `gorm:"type:text" json:"remark"`
  24. IsAlive bool `json:"is_alive"`
  25. ArchiveReason string `gorm:"size:100" json:"archive_reason"`
  26. ArchivedAt time.Time `gorm:"index" json:"archived_at"`
  27. CreatedAt time.Time `json:"created_at"`
  28. }
  29. func (MerchantArchived) TableName() string { return "merchants_archived" }