diff --git a/dal/schema/000017_init.up.sql b/dal/schema/000017_init.up.sql index f775929..8da2b34 100644 --- a/dal/schema/000017_init.up.sql +++ b/dal/schema/000017_init.up.sql @@ -13,6 +13,7 @@ CREATE TABLE IF NOT EXISTS leadtarget( Type LeadTargetType NOT NULL, QuizID integer NOT NULL DEFAULT 0, Target text NOT NULL, + InviteLink text NOT NULL DEFAULT '', Deleted boolean NOT NULL DEFAULT false, CreatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); diff --git a/model/model.go b/model/model.go index c013f0c..5477142 100644 --- a/model/model.go +++ b/model/model.go @@ -309,13 +309,14 @@ type AnswerExport struct { type UTMSavingMap map[string]string type LeadTarget struct { - ID int64 `json:"id"` - AccountID string `json:"accountID"` - Type LeadTargetType `json:"type"` - QuizID int32 `json:"quizID"` - Target string `json:"target"` - Deleted bool `json:"deleted"` - CreatedAt time.Time `json:"createdAt"` + ID int64 `json:"id"` + AccountID string `json:"accountID"` + Type LeadTargetType `json:"type"` + QuizID int32 `json:"quizID"` + Target string `json:"target"` + InviteLink string `json:"inviteLink"` // например указывается для типа телеграмма для созданного канала + Deleted bool `json:"deleted"` + CreatedAt time.Time `json:"createdAt"` } type LeadTargetType string diff --git a/model/tg.go b/model/tg.go index 543a777..0db8bbe 100644 --- a/model/tg.go +++ b/model/tg.go @@ -20,3 +20,9 @@ const ( InactiveTg TgAccountStatus = "inactive" BanTg TgAccountStatus = "ban" ) + +type TgRedisTask struct { + Name string + QuizID int32 + AccountID string +}