2024-03-23 21:16:41 +03:00
|
|
|
package catalog
|
|
|
|
|
|
|
|
import "github.com/uptrace/bun"
|
|
|
|
|
|
|
|
type DBCatalog struct {
|
|
|
|
bun.BaseModel `bun:"select:api_catalog"`
|
2024-03-26 02:21:35 +03:00
|
|
|
Id int64 `bun:"id,pk" json:"id"`
|
2024-03-23 21:16:41 +03:00
|
|
|
Code string `bun:"code" json:"code"`
|
|
|
|
Name string `bun:"name" json:"name"`
|
|
|
|
IsActive bool `bun:"is_active,type:integer" json:"isActive"`
|
|
|
|
Properties *DBCatalogProperties `bun:"properties" json:"properties"`
|
|
|
|
DetailText string `bun:"detailText" json:"detailText"`
|
|
|
|
Price *DBCatalogPrice `bun:"price" json:"price"`
|
|
|
|
AvailableQuantity int64 `bun:"available_quantity" json:"availableQuantity"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DBCatalogProperties struct {
|
|
|
|
Acea string `json:"acea,omitempty"`
|
|
|
|
Width string `json:"width,omitempty"`
|
|
|
|
Height string `json:"height,omitempty"`
|
|
|
|
Length string `json:"length,omitempty"`
|
|
|
|
Volume string `json:"volume,omitempty"`
|
|
|
|
Weight string `json:"weight,omitempty"`
|
|
|
|
Mileage string `json:"mileage,omitempty"`
|
|
|
|
BoxType string `json:"box_type,omitempty"`
|
|
|
|
Category string `json:"category,omitempty"`
|
|
|
|
OilType string `json:"oil_type,omitempty"`
|
|
|
|
Documents []string `json:"documents,omitempty"`
|
|
|
|
UseAreas string `json:"use_areas,omitempty"`
|
|
|
|
Viscosity string `json:"viscosity,omitempty"`
|
|
|
|
AcidIndex string `json:"acid_index,omitempty"`
|
|
|
|
MainImage []string `json:"main_image,omitempty"`
|
|
|
|
PourPoint string `json:"pour_point,omitempty"`
|
|
|
|
FlashPoint string `json:"flash_point,omitempty"`
|
|
|
|
Subcategory string `json:"subcategory,omitempty"`
|
|
|
|
VendorCode string `json:"vendor_code,omitempty"`
|
|
|
|
ApiStandart string `json:"api_standart,omitempty"`
|
|
|
|
Requirements string `json:"requirements,omitempty"`
|
|
|
|
ViscosityIndex string `json:"viscosity_index,omitempty"`
|
|
|
|
ViscosityKinematic string `json:"viscosity_kinematic,omitempty"`
|
|
|
|
TribologicalProperties string `json:"tribological_properties,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DBCatalogPrice struct {
|
|
|
|
BASE float64 `json:"BASE"`
|
|
|
|
OPTMAX float64 `json:"OPTMAX,omitempty"`
|
|
|
|
OPTMIN float64 `json:"OPTMIN,omitempty"`
|
|
|
|
MOC float64 `json:"Мелко-Оптовая Цена (МОЦ),omitempty"`
|
|
|
|
KOC float64 `json:"Крупно-Оптовая Цена (КОЦ),omitempty"`
|
|
|
|
MCP float64 `json:"Минимальная Цена Продаж (МЦП),omitempty"`
|
|
|
|
RRC float64 `json:"Рекомендуемая Розничная цена (РРЦ),omitempty"`
|
|
|
|
}
|