update sqlc gen
This commit is contained in:
parent
e6acec0da1
commit
8bc80d1457
@ -81,13 +81,14 @@ type Field struct {
|
||||
}
|
||||
|
||||
type Leadtarget struct {
|
||||
ID int64 `db:"id" json:"id"`
|
||||
Accountid string `db:"accountid" json:"accountid"`
|
||||
Type interface{} `db:"type" json:"type"`
|
||||
Quizid int32 `db:"quizid" json:"quizid"`
|
||||
Target string `db:"target" json:"target"`
|
||||
Deleted bool `db:"deleted" json:"deleted"`
|
||||
Createdat time.Time `db:"createdat" json:"createdat"`
|
||||
ID int64 `db:"id" json:"id"`
|
||||
Accountid string `db:"accountid" json:"accountid"`
|
||||
Type interface{} `db:"type" json:"type"`
|
||||
Quizid int32 `db:"quizid" json:"quizid"`
|
||||
Target string `db:"target" json:"target"`
|
||||
Invitelink string `db:"invitelink" json:"invitelink"`
|
||||
Deleted bool `db:"deleted" json:"deleted"`
|
||||
Createdat time.Time `db:"createdat" json:"createdat"`
|
||||
}
|
||||
|
||||
type Pipeline struct {
|
||||
|
@ -707,14 +707,15 @@ func (q *Queries) CreateAmoAccount(ctx context.Context, arg CreateAmoAccountPara
|
||||
}
|
||||
|
||||
const createLeadTarget = `-- name: CreateLeadTarget :one
|
||||
INSERT INTO leadtarget (accountID,type,quizID,target) VALUES ($1,$2,$3,$4) RETURNING id, accountid, type, quizid, target, deleted, createdat
|
||||
INSERT INTO leadtarget (accountID,type,quizID,target,InviteLink) VALUES ($1,$2,$3,$4,$5) RETURNING id, accountid, type, quizid, target, invitelink, deleted, createdat
|
||||
`
|
||||
|
||||
type CreateLeadTargetParams struct {
|
||||
Accountid string `db:"accountid" json:"accountid"`
|
||||
Type interface{} `db:"type" json:"type"`
|
||||
Quizid int32 `db:"quizid" json:"quizid"`
|
||||
Target string `db:"target" json:"target"`
|
||||
Accountid string `db:"accountid" json:"accountid"`
|
||||
Type interface{} `db:"type" json:"type"`
|
||||
Quizid int32 `db:"quizid" json:"quizid"`
|
||||
Target string `db:"target" json:"target"`
|
||||
Invitelink string `db:"invitelink" json:"invitelink"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateLeadTarget(ctx context.Context, arg CreateLeadTargetParams) (Leadtarget, error) {
|
||||
@ -723,6 +724,7 @@ func (q *Queries) CreateLeadTarget(ctx context.Context, arg CreateLeadTargetPara
|
||||
arg.Type,
|
||||
arg.Quizid,
|
||||
arg.Target,
|
||||
arg.Invitelink,
|
||||
)
|
||||
var i Leadtarget
|
||||
err := row.Scan(
|
||||
@ -731,6 +733,7 @@ func (q *Queries) CreateLeadTarget(ctx context.Context, arg CreateLeadTargetPara
|
||||
&i.Type,
|
||||
&i.Quizid,
|
||||
&i.Target,
|
||||
&i.Invitelink,
|
||||
&i.Deleted,
|
||||
&i.Createdat,
|
||||
)
|
||||
@ -1757,7 +1760,7 @@ func (q *Queries) GetFieldsWithPagination(ctx context.Context, arg GetFieldsWith
|
||||
}
|
||||
|
||||
const getLeadTarget = `-- name: GetLeadTarget :many
|
||||
SELECT id, accountid, type, quizid, target, deleted, createdat FROM leadtarget WHERE accountID = $1 AND quizID = $2 AND deleted=false
|
||||
SELECT id, accountid, type, quizid, target, invitelink, deleted, createdat FROM leadtarget WHERE accountID = $1 AND quizID = $2 AND deleted=false
|
||||
`
|
||||
|
||||
type GetLeadTargetParams struct {
|
||||
@ -1780,6 +1783,7 @@ func (q *Queries) GetLeadTarget(ctx context.Context, arg GetLeadTargetParams) ([
|
||||
&i.Type,
|
||||
&i.Quizid,
|
||||
&i.Target,
|
||||
&i.Invitelink,
|
||||
&i.Deleted,
|
||||
&i.Createdat,
|
||||
); err != nil {
|
||||
@ -3715,16 +3719,17 @@ func (q *Queries) UpdateFields(ctx context.Context, dollar_1 json.RawMessage) er
|
||||
}
|
||||
|
||||
const updateLeadTarget = `-- name: UpdateLeadTarget :one
|
||||
UPDATE leadtarget SET target = $1 WHERE id = $2 AND deleted=false RETURNING id, accountid, type, quizid, target, deleted, createdat
|
||||
UPDATE leadtarget SET target = $1,InviteLink = $2 WHERE id = $3 AND deleted=false RETURNING id, accountid, type, quizid, target, invitelink, deleted, createdat
|
||||
`
|
||||
|
||||
type UpdateLeadTargetParams struct {
|
||||
Target string `db:"target" json:"target"`
|
||||
ID int64 `db:"id" json:"id"`
|
||||
Target string `db:"target" json:"target"`
|
||||
Invitelink string `db:"invitelink" json:"invitelink"`
|
||||
ID int64 `db:"id" json:"id"`
|
||||
}
|
||||
|
||||
func (q *Queries) UpdateLeadTarget(ctx context.Context, arg UpdateLeadTargetParams) (Leadtarget, error) {
|
||||
row := q.db.QueryRowContext(ctx, updateLeadTarget, arg.Target, arg.ID)
|
||||
row := q.db.QueryRowContext(ctx, updateLeadTarget, arg.Target, arg.Invitelink, arg.ID)
|
||||
var i Leadtarget
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
@ -3732,6 +3737,7 @@ func (q *Queries) UpdateLeadTarget(ctx context.Context, arg UpdateLeadTargetPara
|
||||
&i.Type,
|
||||
&i.Quizid,
|
||||
&i.Target,
|
||||
&i.Invitelink,
|
||||
&i.Deleted,
|
||||
&i.Createdat,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user