mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2024-11-25 22:56:03 +03:00
camelCase json parameters in Connection and Account models
This commit is contained in:
parent
ea1c7b7c19
commit
e9489f0ab9
@ -10,7 +10,7 @@ type Account struct {
|
|||||||
Name string `gorm:"column:name; type:varchar(100)" json:"name,omitempty" binding:"max=100"`
|
Name string `gorm:"column:name; type:varchar(100)" json:"name,omitempty" binding:"max=100"`
|
||||||
Lang string `gorm:"column:lang; type:varchar(2)" json:"lang,omitempty" binding:"max=2"`
|
Lang string `gorm:"column:lang; type:varchar(2)" json:"lang,omitempty" binding:"max=2"`
|
||||||
Channel uint64 `gorm:"column:channel; not null; unique" json:"channel,omitempty"`
|
Channel uint64 `gorm:"column:channel; not null; unique" json:"channel,omitempty"`
|
||||||
ID int `gorm:"primary_key"`
|
ID int `gorm:"primary_key" json:"id"`
|
||||||
ConnectionID int `gorm:"column:connection_id" json:"connectionId,omitempty"`
|
ConnectionID int `gorm:"column:connection_id" json:"connectionId,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,12 +6,12 @@ import "time"
|
|||||||
type Connection struct {
|
type Connection struct {
|
||||||
CreatedAt time.Time
|
CreatedAt time.Time
|
||||||
UpdatedAt time.Time
|
UpdatedAt time.Time
|
||||||
Key string `gorm:"column:api_key; type:varchar(100); not null" json:"api_key,omitempty" binding:"required,max=100"` // nolint:lll
|
Key string `gorm:"column:api_key; type:varchar(100); not null" json:"apiKey,omitempty" binding:"required,max=100"` // nolint:lll
|
||||||
URL string `gorm:"column:api_url; type:varchar(255); not null" json:"api_url,omitempty" binding:"required,validateCrmURL,max=255"` // nolint:lll
|
URL string `gorm:"column:api_url; type:varchar(255); not null" json:"apiUrl,omitempty" binding:"required,validateCrmURL,max=255"` // nolint:lll
|
||||||
GateURL string `gorm:"column:mg_url; type:varchar(255); not null;" json:"mg_url,omitempty" binding:"max=255"`
|
GateURL string `gorm:"column:mg_url; type:varchar(255); not null;" json:"mg_url,omitempty" binding:"max=255"`
|
||||||
GateToken string `gorm:"column:mg_token; type:varchar(100); not null; unique" json:"mg_token,omitempty" binding:"max=100"` // nolint:lll
|
GateToken string `gorm:"column:mg_token; type:varchar(100); not null; unique" json:"mg_token,omitempty" binding:"max=100"` // nolint:lll
|
||||||
ClientID string `gorm:"column:client_id; type:varchar(70); not null; unique" json:"clientId,omitempty"`
|
ClientID string `gorm:"column:client_id; type:varchar(70); not null; unique" json:"clientId,omitempty"`
|
||||||
Accounts []Account `gorm:"foreignkey:ConnectionID"`
|
Accounts []Account `gorm:"foreignkey:ConnectionID" json:"accounts"`
|
||||||
ID int `gorm:"primary_key"`
|
ID int `gorm:"primary_key" json:"id"`
|
||||||
Active bool `json:"active,omitempty"`
|
Active bool `json:"active,omitempty"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user