-
This commit is contained in:
parent
704d08ed0c
commit
ada3f3c47f
@ -134,7 +134,7 @@ CREATE TABLE IF NOT EXISTS YclientsRules (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS YclientsFields (
|
||||
ID BIGSERIAL UNIQUE NOT NULL PRIMARY KEY,
|
||||
BitrixID VARCHAR(255) NOT NULL, -- Айдишник field в битриксе
|
||||
YclientsID INT NOT NULL, -- Айдишник field в Yclients
|
||||
SalonID INT NOT NULL, -- ID компании
|
||||
FieldType CustomFieldsTypeYclients NOT NULL, -- тип поля
|
||||
Code text NOT NULL,
|
||||
|
||||
@ -426,6 +426,19 @@ type Yclientsaccountuser struct {
|
||||
Createdat time.Time `db:"createdat" json:"createdat"`
|
||||
}
|
||||
|
||||
type Yclientsfield struct {
|
||||
ID int64 `db:"id" json:"id"`
|
||||
Yclientsid int32 `db:"yclientsid" json:"yclientsid"`
|
||||
Salonid int32 `db:"salonid" json:"salonid"`
|
||||
Fieldtype interface{} `db:"fieldtype" json:"fieldtype"`
|
||||
Code string `db:"code" json:"code"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Showinui bool `db:"showinui" json:"showinui"`
|
||||
Usercanedit bool `db:"usercanedit" json:"usercanedit"`
|
||||
Deleted bool `db:"deleted" json:"deleted"`
|
||||
Createdat time.Time `db:"createdat" json:"createdat"`
|
||||
}
|
||||
|
||||
type Yclientsrule struct {
|
||||
ID int64 `db:"id" json:"id"`
|
||||
Salonid int32 `db:"salonid" json:"salonid"`
|
||||
|
||||
@ -149,16 +149,6 @@ type ServiceYclientsRule struct {
|
||||
Cost int `json:"cost"`
|
||||
}
|
||||
|
||||
type YclientsCustomFields struct {
|
||||
MyCustomField int `json:"my_custom_field"`
|
||||
SomeAnotherField []string `json:"some_another_field"`
|
||||
}
|
||||
|
||||
type YclientsClientAgreements struct {
|
||||
IsNewsletterAllowed bool `json:"is_newsletter_allowed"`
|
||||
IsPersonalDataProcessingAllowed bool `json:"is_personal_data_processing_allowed"`
|
||||
}
|
||||
|
||||
type YclientsCustomFieldsType string
|
||||
|
||||
const (
|
||||
@ -168,3 +158,16 @@ const (
|
||||
TypeYclientsDate YclientsCustomFieldsType = "date" // Дата (Y-m-d)
|
||||
TypeYclientsDateTime YclientsCustomFieldsType = "datetime" // Дата и время (Y-m-d H:i:s)
|
||||
)
|
||||
|
||||
type YclientsField struct {
|
||||
ID int64 `json:"id"`
|
||||
YclientsID int32 `json:"yclientsID"`
|
||||
SalonID int32 `json:"salonID"`
|
||||
FieldType YclientsCustomFieldsType `json:"field_type"`
|
||||
Code string `json:"code"`
|
||||
Title string `json:"title"`
|
||||
ShowINUI bool `json:"show_in_ui"`
|
||||
UserCanEdit bool `json:"user_can_edit"`
|
||||
Deleted bool `json:"deleted"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user