update table YclientsAccounts
This commit is contained in:
parent
425ba10ad4
commit
a2baabf928
@ -1553,4 +1553,4 @@ update YclientsTokens set Expiration=$1, Active = $2 where AccountID = $3 RETURN
|
||||
select * from YclientsTokens where AccountID = $1 and Expiration=false and Active = true;
|
||||
|
||||
-- name: CreateYclientsAccount :one
|
||||
insert into YclientsAccounts (AccountID,SalonID,Title,Country,ShortDecription,Active) values ($1,$2,$3,$4,$5,$6) RETURNING *;
|
||||
insert into YclientsAccounts (AccountID,SalonID,Title,Country,ShortDecription) values ($1,$2,$3,$4,$5) RETURNING *;
|
||||
@ -15,7 +15,6 @@ CREATE TABLE IF NOT EXISTS YclientsAccounts (
|
||||
SalonID INT NOT NULL, -- ID компании
|
||||
Title text NOT NULL DEFAULT '',
|
||||
ShortDecription text NOT NULL DEFAULT '',
|
||||
Active INT NOT NULL,
|
||||
Country VARCHAR(50) NOT NULL DEFAULT '',
|
||||
Deleted BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
CreatedAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
|
||||
@ -405,7 +405,6 @@ type Yclientsaccount struct {
|
||||
Salonid int32 `db:"salonid" json:"salonid"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Shortdecription string `db:"shortdecription" json:"shortdecription"`
|
||||
Active int32 `db:"active" json:"active"`
|
||||
Country string `db:"country" json:"country"`
|
||||
Deleted bool `db:"deleted" json:"deleted"`
|
||||
Createdat time.Time `db:"createdat" json:"createdat"`
|
||||
|
||||
@ -1265,7 +1265,7 @@ func (q *Queries) CreateWebHook(ctx context.Context, arg CreateWebHookParams) er
|
||||
}
|
||||
|
||||
const createYclientsAccount = `-- name: CreateYclientsAccount :one
|
||||
insert into YclientsAccounts (AccountID,SalonID,Title,Country,ShortDecription,Active) values ($1,$2,$3,$4,$5,$6) RETURNING id, accountid, salonid, title, shortdecription, active, country, deleted, createdat
|
||||
insert into YclientsAccounts (AccountID,SalonID,Title,Country,ShortDecription) values ($1,$2,$3,$4,$5) RETURNING id, accountid, salonid, title, shortdecription, country, deleted, createdat
|
||||
`
|
||||
|
||||
type CreateYclientsAccountParams struct {
|
||||
@ -1274,7 +1274,6 @@ type CreateYclientsAccountParams struct {
|
||||
Title string `db:"title" json:"title"`
|
||||
Country string `db:"country" json:"country"`
|
||||
Shortdecription string `db:"shortdecription" json:"shortdecription"`
|
||||
Active int32 `db:"active" json:"active"`
|
||||
}
|
||||
|
||||
func (q *Queries) CreateYclientsAccount(ctx context.Context, arg CreateYclientsAccountParams) (Yclientsaccount, error) {
|
||||
@ -1284,7 +1283,6 @@ func (q *Queries) CreateYclientsAccount(ctx context.Context, arg CreateYclientsA
|
||||
arg.Title,
|
||||
arg.Country,
|
||||
arg.Shortdecription,
|
||||
arg.Active,
|
||||
)
|
||||
var i Yclientsaccount
|
||||
err := row.Scan(
|
||||
@ -1293,7 +1291,6 @@ func (q *Queries) CreateYclientsAccount(ctx context.Context, arg CreateYclientsA
|
||||
&i.Salonid,
|
||||
&i.Title,
|
||||
&i.Shortdecription,
|
||||
&i.Active,
|
||||
&i.Country,
|
||||
&i.Deleted,
|
||||
&i.Createdat,
|
||||
@ -2461,7 +2458,7 @@ func (q *Queries) GetCurrentCompany(ctx context.Context, accountid string) (Acco
|
||||
|
||||
const getCurrentYclientsCompany = `-- name: GetCurrentYclientsCompany :one
|
||||
|
||||
SELECT id, accountid, salonid, title, shortdecription, active, country, deleted, createdat FROM YclientsAccounts WHERE AccountID = $1 AND Deleted = false
|
||||
SELECT id, accountid, salonid, title, shortdecription, country, deleted, createdat FROM YclientsAccounts WHERE AccountID = $1 AND Deleted = false
|
||||
`
|
||||
|
||||
// Yclients
|
||||
@ -2474,7 +2471,6 @@ func (q *Queries) GetCurrentYclientsCompany(ctx context.Context, accountid strin
|
||||
&i.Salonid,
|
||||
&i.Title,
|
||||
&i.Shortdecription,
|
||||
&i.Active,
|
||||
&i.Country,
|
||||
&i.Deleted,
|
||||
&i.Createdat,
|
||||
|
||||
@ -17,7 +17,6 @@ type YclientsAccount struct {
|
||||
SalonID int32 `json:"salon_id"` // ID "аккаунта который ГЛАВНЫЙ"
|
||||
Title string `json:"title"`
|
||||
ShortDecription string `json:"shortDecription"`
|
||||
Active int32 `json:"active"`
|
||||
Country string `json:"country"`
|
||||
Deleted bool `json:"deleted"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
|
||||
@ -109,7 +109,6 @@ func (r *YclientsRepository) GetCurrentAccount(ctx context.Context, accountID st
|
||||
Title: row.Title,
|
||||
Country: row.Country,
|
||||
ShortDecription: row.Shortdecription,
|
||||
Active: row.Active,
|
||||
Deleted: row.Deleted,
|
||||
CreatedAt: row.Createdat,
|
||||
}
|
||||
@ -175,7 +174,6 @@ func (r *YclientsRepository) CreateAccount(ctx context.Context, account model.Yc
|
||||
Title: account.Title,
|
||||
Country: account.Country,
|
||||
Shortdecription: account.ShortDecription,
|
||||
Active: account.Active,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -188,7 +186,6 @@ func (r *YclientsRepository) CreateAccount(ctx context.Context, account model.Yc
|
||||
Title: row.Title,
|
||||
Country: row.Country,
|
||||
ShortDecription: row.Shortdecription,
|
||||
Active: row.Active,
|
||||
Deleted: row.Deleted,
|
||||
CreatedAt: row.Createdat,
|
||||
}, nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user