common/model/bitrixTypes.go

79 lines
2.8 KiB
Go

package model
type FieldsType string
const (
FieldTypeLead FieldsType = "CRM_LEAD"
FieldTypeCompany FieldsType = "CRM_COMPANY"
FieldTypeContact FieldsType = "CRM_CONTACT"
FieldTypeDeal FieldsType = "CRM_DEAL"
FieldTypeInvoiceOld FieldsType = "CRM_INVOICE"
FieldTypeInvoiceNew FieldsType = "CRM_SMART_INVOICE"
FieldTypeQuote FieldsType = "CRM_QUOTE"
FieldTypeRequisite FieldsType = "CRM_REQUISITE"
)
type IntegerEntityType int
const (
IntegerEntityTypeLead IntegerEntityType = 1 // воронки не поддерживает
IntegerEntityTypeCompany IntegerEntityType = 4
IntegerEntityTypeContact IntegerEntityType = 3
IntegerEntityTypeDeal IntegerEntityType = 2
IntegerEntityTypeInvoiceOld IntegerEntityType = 5 // может вернуть 400
IntegerEntityTypeInvoiceNew IntegerEntityType = 31
IntegerEntityTypeQuote IntegerEntityType = 7 // воронки не поддерживает
IntegerEntityTypeRequisite IntegerEntityType = 8 // может вернуть 400
)
type NameEntityType string
const (
NameEntityTypeLead NameEntityType = "LEAD"
NameEntityTypeCompany NameEntityType = "COMPANY"
NameEntityTypeContact NameEntityType = "CONTACT"
NameEntityTypeDeal NameEntityType = "DEAL"
NameEntityTypeInvoiceOld NameEntityType = "INVOICE"
NameEntityTypeInvoiceNew NameEntityType = "SMART_INVOICE"
NameEntityTypeQuote NameEntityType = "QUOTE"
NameEntityTypeRequisite NameEntityType = "REQUISITE"
)
type CompanyType string
const (
CompanyTypeCustomer CompanyType = "customer"
)
type BitrixIsDefault string
const (
BitrixIsDefaultY BitrixIsDefault = "Y"
BitrixIsDefaultN BitrixIsDefault = "N"
)
var CategoryArr = [4]IntegerEntityType{
IntegerEntityTypeCompany, IntegerEntityTypeContact, IntegerEntityTypeDeal, IntegerEntityTypeInvoiceNew,
}
type CustomFieldsType string
const (
StringCustomFieldsType CustomFieldsType = "string"
IntegerCustomFieldsType CustomFieldsType = "integer"
DoubleCustomFieldsType CustomFieldsType = "double"
BooleanCustomFieldsType CustomFieldsType = "boolean"
DatetimeCustomFieldsType CustomFieldsType = "datetime"
EnumerationCustomFieldsType CustomFieldsType = "enumeration"
IblockSectionCustomFieldsType CustomFieldsType = "iblock_section"
IblockElementCustomFieldsType CustomFieldsType = "iblock_element"
EmployeeCustomFieldsType CustomFieldsType = "employee"
CrmStatusCustomFieldsType CustomFieldsType = "crm_status"
CrmCustomFieldsType CustomFieldsType = "crm"
AddressCustomFieldsType CustomFieldsType = "address"
MoneyCustomFieldsType CustomFieldsType = "money"
UrlCustomFieldsType CustomFieldsType = "url"
FileCustomFieldsType CustomFieldsType = "file"
PenaTagCustomFieldsType CustomFieldsType = "crm_pena_tag"
)