Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cart ¶ added in v0.3.0
type CartDetail ¶ added in v0.3.7
type Checkout ¶ added in v0.3.8
type Checkout struct { gorm.Model CartId int `gorm:"column:cart_id" json:"cart_id"` PaymentMethodId string `gorm:"column:payment_method_id" json:"payment_method_id"` Amount float32 `gorm:"column:amount" json:"amount"` Currency enums.Currency `gorm:"column:currency" json:"currency"` Discount float32 `gorm:"column:discount" json:"discount"` DiscountPercentage float32 `gorm:"column:discount_percentage" json:"discount_percent"` StoreId int `gorm:"column:store_id" json:"store_id"` InternalId string `json:"internal_id"` }
type Discount ¶ added in v0.3.2
type Discount struct { Id int64 `json:"id"` StoreProductId int `json:"store_product_id"` StoreId int `json:"store_id"` Name string `json:"name"` Description string `json:"description"` Disclaimer string `json:"disclaimer"` Percent int `json:"percent"` StartDate string `json:"start_date"` EndDate string `json:"end_date"` Status string `json:"status"` }
type JWTPayload ¶ added in v0.3.7
type Pagination ¶ added in v0.1.8
type Product ¶
type Product struct { ID string `json:"id" type:"string"` Name string `json:"name"` Status string `json:"status" default:"ACTIVE"` Category string `json:"category"` SubCategory string `json:"sub_category"` Description string `json:"description"` ReferencePrice float64 `json:"reference_price" bson:"reference_price"` Discontinued bool `json:"discontinued" default:"false"` InternalId string `json:"internal_id"` IsPharma bool `json:"is_pharma" bson:"is_pharma" default:"false"` IsAlcoholic bool `json:"is_alcoholic" bson:"is_alcoholic" default:"false"` IsCigarette bool `json:"is_cigarette" bson:"is_cigarette" default:"false"` NeedsRx bool `json:"needs_rx" bson:"needs_rx" default:"false"` Maker string `json:"maker"` TradeMark string `json:"trade_mark" bson:"trade_mark"` Images []Image `json:"images"` Measures Measures `json:"measures"` Metadata string `json:"metadata"` Packing string `json:"packing"` Weight float64 `json:"weight"` ContainedUnits uint32 `json:"contained_units" bson:"contained_units"` Ean string `json:"ean" bson:"ean"` Sku string `json:"sku" bson:"sku"` IsForAdult bool `json:"is_for_adult" bson:"is_for_adult" default:"false"` CreatedAt time.Time `json:"created_at" bson:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"deleted_at"` }
type Receipt ¶ added in v0.8.2
type Sale ¶ added in v0.4.2
type Sale struct { gorm.Model CartId string `gorm:"column:cart_id" json:"cart_id"` StoreId string `gorm:"column:store_id" json:"store_id"` Amount float32 `gorm:"column:amount" json:"amount"` Currency string `gorm:"column:currency" json:"currency"` Discount float32 `gorm:"column:discount" json:"discount"` DiscountPercentage float32 `gorm:"column:discount_percentage" json:"discount_percentage"` PaymentMethod string `gorm:"column:payment_method" json:"payment_method"` SellerId string `gorm:"column:seller_id" json:"seller_id"` IssueReceipt bool `gorm:"column:issue_receipt" json:"issue_receipt"` ReceiptId string `gorm:"column:receipt_id" json:"receipt_id"` Status string `gorm:"column:status" json:"status"` InternalId string `gorm:"column:internal_id" json:"internal_id"` }
type Store ¶
type Store struct { gorm.Model Name string `json:"name"` Status string `gorm:"default:ACTIVE" json:"status"` Country string `json:"country"` City string `json:"city"` Street string `json:"street"` StreetNumber string `json:"street_number"` Latitude float32 `json:"latitude"` Longitude float32 `json:"longitude"` PostalCode string `json:"postal_code"` Phone string `json:"phone"` Email string `json:"email"` InternalId string `json:"internal_id"` }
type StoreProduct ¶
type StoreProduct struct { gorm.Model StoreId uint `json:"store_id"` Category string `json:"category"` SubCategory string `json:"sub_category"` ProductId string `json:"product_id"` AvailableUnits int `json:"available_units"` ReservedUnits int `json:"reserved_units"` Price float32 `json:"price"` Status string `json:"status" gorm:"default:'ACTIVE'"` InternalId string `json:"internal_id"` IsCustom bool `json:"is_custom" gorm:"default:false"` Ean string `json:"ean"` Sku string `json:"sku"` ProductName string `json:"product_name"` }
func (*StoreProduct) BeforeCreate ¶ added in v0.1.9
func (s *StoreProduct) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate will set a UUID rather than numeric ID.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.