feat(crm): complete contact label avatar gaps

This commit is contained in:
2026-06-05 02:53:24 +08:00
parent 5cf735076d
commit 7a033e28a0
16 changed files with 512 additions and 31 deletions
+18
View File
@@ -0,0 +1,18 @@
package model
import "time"
// ContactLabel stores the account label/tag assignments for contacts.
// Reference: Chatwoot Contact includes Labelable and uses label_list.
type ContactLabel struct {
ContactID uint `gorm:"primaryKey;autoIncrement:false;index" json:"contact_id"`
TagID uint `gorm:"primaryKey;autoIncrement:false;index" json:"tag_id"`
AccountID uint `gorm:"not null;index" json:"account_id"`
CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
Contact Contact `gorm:"foreignKey:ContactID" json:"contact,omitempty"`
Tag Tag `gorm:"foreignKey:TagID" json:"tag,omitempty"`
}
func (ContactLabel) TableName() string { return "contact_labels" }