package model import ( "time" "gorm.io/datatypes" ) // MerchantClean stores validated, deduplicated merchants. type MerchantClean struct { ID uint `gorm:"primaryKey;autoIncrement" json:"id"` TgUsername string `gorm:"uniqueIndex;size:255" 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"` SourceCount int `gorm:"default:1" json:"source_count"` AllSources datatypes.JSON `gorm:"type:json" json:"all_sources"` IndustryTag string `gorm:"size:100;index" json:"industry_tag"` Level string `gorm:"size:10;index" json:"level"` // Hot / Warm / Cold Status string `gorm:"size:20;not null;index" json:"status"` // valid / invalid / bot / duplicate IsAlive bool `gorm:"default:false" json:"is_alive"` LastCheckedAt *time.Time `json:"last_checked_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } func (MerchantClean) TableName() string { return "merchants_clean" }