| 123456789101112131415161718192021222324 |
- package model
- import "time"
- // MerchantRaw stores raw merchant data from all collector plugins.
- // Dedup rule: same tg_username + same source_url = skip insert.
- type MerchantRaw struct {
- ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
- TgUsername string `gorm:"size:255;index;not null" json:"tg_username"`
- TgLink string `gorm:"size:500" json:"tg_link"`
- MerchantName string `gorm:"size:500" json:"merchant_name"`
- Website string `gorm:"size:2048" json:"website"`
- Email string `gorm:"size:255" json:"email"`
- Phone string `gorm:"size:100" json:"phone"`
- SourceType string `gorm:"size:50;not null" json:"source_type"`
- SourceName string `gorm:"size:500" json:"source_name"`
- SourceURL string `gorm:"size:2048" json:"source_url"`
- OriginalText string `gorm:"type:text" json:"original_text"`
- IndustryTag string `gorm:"size:100" json:"industry_tag"`
- Status string `gorm:"size:20;default:'raw';index" json:"status"` // raw / processing / done
- CreatedAt time.Time `json:"created_at"`
- }
- func (MerchantRaw) TableName() string { return "merchants_raw" }
|