add migrate file for save amo contact data
This commit is contained in:
parent
6d44920115
commit
0116666117
1
dal/schema/000016_init.down.sql
Normal file
1
dal/schema/000016_init.down.sql
Normal file
@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS amoContact;
|
6
dal/schema/000016_init.up.sql
Normal file
6
dal/schema/000016_init.up.sql
Normal file
@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS amoContact (
|
||||
ID BIGSERIAL UNIQUE NOT NULL PRIMARY KEY,
|
||||
AccountID INT NOT NULL, -- ID "компании" в амо
|
||||
AmoID INT NOT NULL, -- ID контакта в амо
|
||||
Field text NOT NULL DEFAULT '' -- значение чего то email? phone? etc
|
||||
)
|
@ -288,3 +288,11 @@ type AmoUsersTrueResults struct {
|
||||
QuizAccountID string
|
||||
DriveURL string
|
||||
}
|
||||
|
||||
// возможно стоит добавить enum? тип ContactQuizConfig уже есть
|
||||
type ContactAmo struct {
|
||||
ID int64
|
||||
AccountID int32 // id аккаунта в амо к которому привязан контакт
|
||||
AmoID int32 // id контакта в амо
|
||||
Field string // значение поля
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ packages:
|
||||
- "./dal/schema/000013_init.down.sql"
|
||||
- "./dal/schema/000014_init.up.sql"
|
||||
- "./dal/schema/000014_init.down.sql"
|
||||
- "./dal/schema/000016_init.up.sql"
|
||||
- "./dal/schema/000016_init.down.sql"
|
||||
engine: "postgresql"
|
||||
emit_json_tags: true
|
||||
emit_db_tags: true
|
||||
|
Loading…
Reference in New Issue
Block a user