modify lead target mig files and added struct for redis tg task

This commit is contained in:
pasha1coil 2024-07-11 11:37:39 +03:00
parent c2a0ba2ac3
commit b7ab43df14
3 changed files with 15 additions and 7 deletions

@ -13,6 +13,7 @@ CREATE TABLE IF NOT EXISTS leadtarget(
Type LeadTargetType NOT NULL, Type LeadTargetType NOT NULL,
QuizID integer NOT NULL DEFAULT 0, QuizID integer NOT NULL DEFAULT 0,
Target text NOT NULL, Target text NOT NULL,
InviteLink text NOT NULL DEFAULT '',
Deleted boolean NOT NULL DEFAULT false, Deleted boolean NOT NULL DEFAULT false,
CreatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP CreatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
); );

@ -309,13 +309,14 @@ type AnswerExport struct {
type UTMSavingMap map[string]string type UTMSavingMap map[string]string
type LeadTarget struct { type LeadTarget struct {
ID int64 `json:"id"` ID int64 `json:"id"`
AccountID string `json:"accountID"` AccountID string `json:"accountID"`
Type LeadTargetType `json:"type"` Type LeadTargetType `json:"type"`
QuizID int32 `json:"quizID"` QuizID int32 `json:"quizID"`
Target string `json:"target"` Target string `json:"target"`
Deleted bool `json:"deleted"` InviteLink string `json:"inviteLink"` // например указывается для типа телеграмма для созданного канала
CreatedAt time.Time `json:"createdAt"` Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"createdAt"`
} }
type LeadTargetType string type LeadTargetType string

@ -20,3 +20,9 @@ const (
InactiveTg TgAccountStatus = "inactive" InactiveTg TgAccountStatus = "inactive"
BanTg TgAccountStatus = "ban" BanTg TgAccountStatus = "ban"
) )
type TgRedisTask struct {
Name string
QuizID int32
AccountID string
}