| 1234567891011121314151617181920212223242526272829303132 |
- 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:idx_clean_filter,priority:3" json:"industry_tag"`
- Level string `gorm:"size:10;index:idx_clean_filter,priority:2" json:"level"` // Hot / Warm / Cold
- Status string `gorm:"size:20;not null;index:idx_clean_filter,priority:1" json:"status"` // valid / invalid / bot / duplicate
- FollowStatus string `gorm:"size:20;default:'pending';index" json:"follow_status"`
- AssignedTo string `gorm:"size:50;index" json:"assigned_to"`
- Remark string `gorm:"type:text" json:"remark"`
- 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" }
|