Documentation ¶
Index ¶
- func AddProductCategories(par *ProductCategories) error
- func AddReports(par *Reports) error
- func CheckAuth(username, password string) (bool, error)
- func CloseDB()
- func ExistProductCategories(par *ProductCategories) (bool, error)
- func ExistReports(par *Reports) (bool, error)
- func Setup()
- type Auth
- type Model
- type ProductCategories
- type Reports
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddProductCategories ¶
func AddProductCategories(par *ProductCategories) error
AddProductCategories 添加分类
func ExistProductCategories ¶
func ExistProductCategories(par *ProductCategories) (bool, error)
ExistProductCategories 检查sku对应的
Types ¶
type Auth ¶
type Auth struct { ID int `gorm:"primary_key" json:"id"` Username string `json:"username"` Password string `json:"password"` }
Auth 结构体
type Model ¶
type Model struct { CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `sql:"index" json:"deleted_at"` UUID uuid.UUID `gorm:"type:char(36);primary_key;UNIQUE_INDEX" json:"uuid"` }
Model 公共模型
type ProductCategories ¶
type ProductCategories struct { Model SellerID string `json:"seller_id" sql:"index" ` MarketplaceID string `json:"marketplace_id" sql:"index" ` SellerSKU string `json:"seller_sku" sql:"index" ` Asin string `json:"asin"` ProductCategoryID int64 `json:"product_category_id"` ProductCategoryName string `json:"product_category_name"` ParentProductCategoryID int64 `json:"parent_product_category_id"` ParentProductCategoryName string `json:"parent_product_category_name"` SecondProductCategoryID int64 `json:"second_product_category_id"` SecondProductCategoryName string `json:"product_category_name"` }
ProductCategories 商品分类
func GetProductCategories ¶
func GetProductCategories(par *ProductCategories) (categories ProductCategories, err error)
GetProductCategories 获取分类
type Reports ¶
type Reports struct { Model SellerID string `json:"seller_id" sql:"index" ` MarketplaceID string `json:"marketplace_id" sql:"index" ` SellerSKU string `json:"seller_sku" sql:"index" ` Asin string `json:"asin"` ReportRequestID string `json:"report_request_id"` ReportType string `json:"report_type"` StartDate time.Time `json:"start_date"` EndDate time.Time `json:"end_date"` Scheduled string `json:"scheduled"` SubmittedDate time.Time `json:"submitted_date"` ReportProcessingStatus string `json:"report_processing_status"` GeneratedReportID string `json:"generated_report_id"` StartedProcessingDate time.Time `json:"started_processing_date"` CompletedDate time.Time `json:"completed_date"` }
Reports 报告表
Click to show internal directories.
Click to hide internal directories.