add drive url to amo entity models and queries
This commit is contained in:
parent
74ecde46ec
commit
41e21f5f84
@ -686,8 +686,8 @@ RETURNING quiz_id;
|
||||
-- amo methods:
|
||||
|
||||
-- name: CreateAmoAccount :exec
|
||||
INSERT INTO users (AccountID, AmoID, Name, Email, Role, "Group", Deleted, CreatedAt, Subdomain, AmoUserID, Country)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11);
|
||||
INSERT INTO users (AccountID, AmoID, Name, Email, Role, "Group", Deleted, CreatedAt, Subdomain, AmoUserID, Country,DriveURL)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
|
||||
|
||||
-- name: CreateWebHook :exec
|
||||
INSERT INTO tokens (AccountID, RefreshToken, AccessToken, AuthCode, Expiration, CreatedAt)
|
||||
@ -993,7 +993,7 @@ SELECT a.quiz_id,a.id,a.result,a.question_id,a.content,a.session,
|
||||
FROM answer a2
|
||||
WHERE a2.start = true AND a2.session = a.session
|
||||
LIMIT 1) AS utm
|
||||
,t.accesstoken,r.accountid,r.fieldsrule,r.tagstoadd,r.performerid,r.stepid,r.pipelineid,(SELECT u.name FROM users u WHERE u.amoid = r.performerid) AS performer_name,u.subdomain,u.accountid
|
||||
,t.accesstoken,r.accountid,r.fieldsrule,r.tagstoadd,r.performerid,r.stepid,r.pipelineid,(SELECT u.name FROM users u WHERE u.amoid = r.performerid) AS performer_name,u.subdomain,u.accountid,u.driveurl
|
||||
FROM answer a
|
||||
INNER JOIN quiz q ON a.quiz_id = q.id
|
||||
LEFT JOIN amoCRMStatuses s ON a.id = s.AnswerID
|
||||
|
@ -1,2 +1,4 @@
|
||||
ALTER TABLE rules
|
||||
DROP COLUMN IF EXISTS TagsToAdd;
|
||||
DROP COLUMN IF EXISTS TagsToAdd;
|
||||
ALTER TABLE users
|
||||
DROP COLUMN IF EXISTS DriveURL;
|
@ -1,2 +1,4 @@
|
||||
ALTER TABLE rules
|
||||
ADD COLUMN TagsToAdd JSONB NOT NULL DEFAULT '{}';
|
||||
ALTER TABLE users
|
||||
ADD COLUMN DriveURL text NOT NULL DEFAULT '';
|
||||
|
@ -25,6 +25,8 @@ type User struct {
|
||||
Amouserid int32 `json:"AmoUserID"`
|
||||
/* - страна указанная в настройках амо*/
|
||||
Country string `json:"Country"`
|
||||
// урл объектного хранилища пользователя в амо
|
||||
DriveURL string `json:"DriveURL"`
|
||||
}
|
||||
|
||||
type UserGroups struct {
|
||||
@ -286,4 +288,5 @@ type AmoUsersTrueResults struct {
|
||||
PerformerName string
|
||||
SubDomain string
|
||||
QuizAccountID string
|
||||
DriveURL string
|
||||
}
|
||||
|
@ -21,7 +21,8 @@ type GetCurrentAccountResp struct {
|
||||
/* - страна указанная в настройках амо*/
|
||||
Country string `json:"Country"`
|
||||
/* - таймштамп создания аккаунта*/
|
||||
Createdat int64 `json:"CreatedAt"`
|
||||
Createdat int64 `json:"CreatedAt"`
|
||||
DriveURL string `json:"DriveURL"`
|
||||
}
|
||||
|
||||
//type GetListUserUTMResp struct {
|
||||
|
Loading…
Reference in New Issue
Block a user