Documentation ¶
Index ¶
- type Category
- type OriginProduct
- type SaleProduct
- type Store
- func (s *Store) Close() error
- func (s *Store) DeleteCategoriesNotInList(ids []int64) error
- func (s *Store) DeleteUser(id int64) error
- func (s *Store) GetCategories() ([]Category, error)
- func (s *Store) SaveCategories(categories *[]Category) error
- func (s *Store) SaveOriginProducts(products *[]OriginProduct) error
- func (s *Store) SaveSaleProduct(product *SaleProduct) error
- func (s *Store) SaveSaleProducts(products *[]SaleProduct) error
- func (s *Store) SaveUser(u *User) error
- func (s *Store) SelectGoodProducts(limit int, userID int64, minComments int64, minMark float64, minDiscount int64) ([]TopDiscount, error)
- func (s *Store) SelectOriginIDList(limit int) (idList []int64, err error)
- func (s *Store) SelectProductWithoutOriginID() (product SaleProduct, err error)
- func (s *Store) SelectUsers() (users []User, err error)
- func (s *Store) UpdateOriginID(product *SaleProduct) error
- func (s *Store) UpdateUser(u *User) error
- type TopDiscount
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct { ID int64 `copier:"Id" gorm:"primaryKey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Count int64 `json:"count,omitempty"` Name string `json:"name,omitempty"` Title string `json:"title,omitempty"` ParentId int64 `json:"parent_id"` GoodsCount int64 `json:"goods_count"` SaleProducts []SaleProduct }
func (*Category) SaleProductMap ¶
type OriginProduct ¶
type OriginProduct struct { ID int64 `copier:"Id" gorm:"primaryKey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Title string `json:"title"` Price *float64 `json:"price,omitempty"` OldPrice *float64 `json:"old_price,omitempty"` PricePcs *string `json:"price_pcs,omitempty"` Href *string `json:"href,omitempty"` Status *string `json:"status,omitempty"` CategoryId *int64 `json:"category_id,omitempty"` Brand *string `json:"brand,omitempty"` BrandId *int64 `json:"brand_id,omitempty"` SellStatus *string `json:"sell_status,omitempty"` Docket *string `json:"docket,omitempty"` CommentsAmount *float64 `json:"comments_amount,omitempty"` CommentsMark *float64 `json:"comments_mark,omitempty"` Stars *string `json:"stars,omitempty"` SellerId *float64 `json:"seller_id,omitempty"` MerchantId *float64 `json:"merchant_id,omitempty"` }
type SaleProduct ¶
type SaleProduct struct { ID int64 `copier:"Id" gorm:"primaryKey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Title string `json:"title"` Price *float64 `json:"price,omitempty"` OldPrice *float64 `json:"old_price,omitempty"` PricePcs *string `json:"price_pcs,omitempty"` Href *string `json:"href,omitempty"` Status *string `json:"status,omitempty"` CategoryId *int64 `json:"category_id,omitempty"` Brand *string `json:"brand,omitempty"` BrandId *int64 `json:"brand_id,omitempty"` SellStatus *string `json:"sell_status,omitempty"` Docket *string `json:"docket,omitempty"` OriginID *int64 ImageMain *string `json:"image_main,omitempty"` }
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DeleteCategoriesNotInList ¶
func (*Store) DeleteUser ¶
func (*Store) GetCategories ¶
func (*Store) SaveCategories ¶
func (*Store) SaveOriginProducts ¶
func (s *Store) SaveOriginProducts(products *[]OriginProduct) error
func (*Store) SaveSaleProduct ¶
func (s *Store) SaveSaleProduct(product *SaleProduct) error
func (*Store) SaveSaleProducts ¶
func (s *Store) SaveSaleProducts(products *[]SaleProduct) error
func (*Store) SelectGoodProducts ¶
func (*Store) SelectOriginIDList ¶
func (*Store) SelectProductWithoutOriginID ¶
func (s *Store) SelectProductWithoutOriginID() (product SaleProduct, err error)
func (*Store) SelectUsers ¶
func (*Store) UpdateOriginID ¶
func (s *Store) UpdateOriginID(product *SaleProduct) error
func (*Store) UpdateUser ¶
type TopDiscount ¶
Click to show internal directories.
Click to hide internal directories.