Documentation ¶
Index ¶
- Variables
- type Address
- type Article
- type AuthIdentity
- type AuthInfo
- type AvatarImageStorage
- type Category
- type Chart
- type Collection
- type Color
- type ColorVariation
- type ColorVariationImage
- type ColorVariationImageStorage
- type FeeSetting
- type Material
- type MediaLibrary
- type Order
- type OrderItem
- type Owner
- type Page
- type Product
- type ProductImage
- func (productImage *ProductImage) GetMediaOption() (mediaOption media_library.MediaOption)
- func (productImage *ProductImage) GetSelectedType() string
- func (productImage *ProductImage) ScanMediaOptions(mediaOption media_library.MediaOption) error
- func (productImage *ProductImage) SetSelectedType(typ string)
- func (productImage ProductImage) Validate(db *gorm.DB)
- type ProductProperties
- type ProductProperty
- type ProductVariation
- type Setting
- type SignLog
- type Size
- type SizeVariation
- type Store
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OrderState = transition.New(&Order{}) ItemState = transition.New(&OrderItem{}) )
Functions ¶
This section is empty.
Types ¶
type Address ¶
type AuthIdentity ¶
type AuthInfo ¶
type AuthInfo struct { PhoneVerificationCode string PhoneVerificationCodeExpiry *time.Time PhoneConfirmedAt *time.Time UnconfirmedPhone string // only use when changing phone number EmailConfirmedAt *time.Time UnconfirmedEmail string // only use when changing email SignInCount uint SignLogs []SignLog }
type AvatarImageStorage ¶
type Category ¶
type Category struct { gorm.Model l10n.Locale sorting.Sorting Name string Code string Categories []Category CategoryID uint }
func (Category) DefaultPath ¶
type Chart ¶
func GetChartData ¶
date format 2015-01-23
type Collection ¶
type Collection struct { gorm.Model Name string l10n.LocaleCreatable }
type ColorVariation ¶
type ColorVariation struct { gorm.Model ProductID uint Product Product ColorID uint Color Color ColorCode string Images media_library.MediaBox SizeVariations []SizeVariation }
func (ColorVariation) MainImageURL ¶
func (colorVariation ColorVariation) MainImageURL() string
type ColorVariationImage ¶
type ColorVariationImage struct { gorm.Model ColorVariationID uint Image ColorVariationImageStorage `sql:"type:varchar(4096)"` }
type FeeSetting ¶
type MediaLibrary ¶
type MediaLibrary struct { Title string media_library.MediaLibrary }
type Order ¶
type Order struct { gorm.Model UserID uint User User PaymentAmount float32 AbandonedReason string DiscountValue uint TrackingNumber *string ShippedAt *time.Time ReturnedAt *time.Time CancelledAt *time.Time ShippingAddressID uint `form:"shippingaddress"` ShippingAddress Address BillingAddressID uint `form:"billingaddress"` BillingAddress Address OrderItems []OrderItem transition.Transition }
type OrderItem ¶
type OrderItem struct { gorm.Model OrderID uint SizeVariationID uint `cartitem:"SizeVariationID"` SizeVariation SizeVariation Quantity uint `cartitem:"Quantity"` Price float32 DiscountRate uint transition.Transition }
type Product ¶
type Product struct { gorm.Model l10n.Locale sorting.SortingDESC Name string NameWithSlug slug.Slug `l10n:"sync"` Code string `l10n:"sync"` CategoryID uint `l10n:"sync"` Category Category `l10n:"sync"` Collections []Collection `l10n:"sync" gorm:"many2many:product_collections;"` MadeCountry string `l10n:"sync"` Gender string `l10n:"sync"` MainImage media_library.MediaBox Price float32 `l10n:"sync"` Description string `sql:"size:2000"` ColorVariations []ColorVariation `l10n:"sync"` ColorVariationsSorter sorting.SortableCollection ProductProperties ProductProperties `sql:"type:text"` Seo qor_seo.Setting Variations []ProductVariation publish2.Version publish2.Schedule publish2.Visible }
func (Product) DefaultPath ¶
func (Product) MainImageURL ¶
type ProductImage ¶
type ProductImage struct { gorm.Model Title string Color Color ColorID uint Category Category CategoryID uint SelectedType string File media_library.MediaLibraryStorage `sql:"size:4294967295;" media_library:"url:/system/{{class}}/{{primary_key}}/{{column}}.{{extension}}"` }
func (*ProductImage) GetMediaOption ¶
func (productImage *ProductImage) GetMediaOption() (mediaOption media_library.MediaOption)
func (*ProductImage) GetSelectedType ¶
func (productImage *ProductImage) GetSelectedType() string
func (*ProductImage) ScanMediaOptions ¶
func (productImage *ProductImage) ScanMediaOptions(mediaOption media_library.MediaOption) error
func (*ProductImage) SetSelectedType ¶
func (productImage *ProductImage) SetSelectedType(typ string)
func (ProductImage) Validate ¶
func (productImage ProductImage) Validate(db *gorm.DB)
type ProductProperties ¶
type ProductProperties []ProductProperty
func (*ProductProperties) Scan ¶
func (productProperties *ProductProperties) Scan(value interface{}) error
type ProductProperty ¶
type ProductVariation ¶
type ProductVariation struct { gorm.Model ProductID *uint Product Product Color Color `variations:"primary"` ColorID *uint Size Size `variations:"primary"` SizeID *uint Material Material `variations:"primary"` MaterialID *uint SKU string ReceiptName string Featured bool Price uint SellingPrice uint AvailableQuantity uint Images media_library.MediaBox }
type SizeVariation ¶
type SizeVariation struct { gorm.Model ColorVariationID uint ColorVariation ColorVariation SizeID uint Size Size AvailableQuantity uint }
func SizeVariations ¶
func SizeVariations() []SizeVariation
func (SizeVariation) Stringify ¶
func (sizeVariation SizeVariation) Stringify() string
type User ¶
type User struct { gorm.Model Email string `form:"email"` Password string Name string `form:"name"` Gender string Role string Birthday *time.Time Balance float32 DefaultBillingAddress uint `form:"default-billing-address"` DefaultShippingAddress uint `form:"default-shipping-address"` Addresses []Address Avatar AvatarImageStorage // Confirm ConfirmToken string Confirmed bool // Recover RecoverToken string RecoverTokenExpiry *time.Time // Accepts AcceptPrivate bool `form:"accept-private"` AcceptLicense bool `form:"accept-license"` AcceptNews bool `form:"accept-news"` }
func (User) AvailableLocales ¶
func (User) DisplayName ¶
Click to show internal directories.
Click to hide internal directories.