Versions in this module Expand all Collapse all v0 v0.1.0 Jan 15, 2022 Changes in this version + type Category struct + Count int64 + CreatedAt time.Time + DeletedAt gorm.DeletedAt + GoodsCount int64 + ID int64 + Name string + ParentId int64 + SaleProducts []SaleProduct + Title string + UpdatedAt time.Time + func (c *Category) SaleProductMap() map[int64]bool + type OriginProduct struct + Brand *string + BrandId *int64 + CategoryId *int64 + CommentsAmount *float64 + CommentsMark *float64 + CreatedAt time.Time + DeletedAt gorm.DeletedAt + Docket *string + Href *string + ID int64 + MerchantId *float64 + OldPrice *float64 + Price *float64 + PricePcs *string + SellStatus *string + SellerId *float64 + Stars *string + Status *string + Title string + UpdatedAt time.Time + type SaleProduct struct + Brand *string + BrandId *int64 + CategoryId *int64 + CreatedAt time.Time + DeletedAt gorm.DeletedAt + Docket *string + Href *string + ID int64 + ImageMain *string + OldPrice *float64 + OriginID *int64 + Price *float64 + PricePcs *string + SellStatus *string + Status *string + Title string + UpdatedAt time.Time + type Store struct + func NewStore(log *zap.Logger, cfg *config.Config) (*Store, error) + 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 struct + Brand string + CommentsAmount int64 + CommentsMark float64 + Discount int64 + Href string + ID int64 + ImageMain string + OldPrice float64 + OriginHref string + OriginPrice float64 + PostOldPrice bool + Price float64 + Reason string + Title string + type User struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + Discount int64 + FirstName string + ID int64 + Rating float64 + SaleProducts []SaleProduct + UpdatedAt time.Time + UserName string