Documentation
¶
Index ¶
- type AddCouponParams
- type AddCouponRow
- type AddCouponToCartParams
- type AddProductToCartParams
- type AddShopParams
- type AddUserParams
- type Cart
- type CartCoupon
- type CartProduct
- type CheckoutParams
- type Coupon
- type CouponScope
- type CouponTag
- type CouponType
- type CreateAdminParams
- type DB
- type DBTX
- type DeleteCouponFromCartParams
- type DeleteEmptyCartParams
- type DeleteProductFromCartParams
- type EditCouponParams
- type EditCouponRow
- type FindUserByRefreshTokenRow
- type FindUserInfoAndPasswordRow
- type GetCartRow
- type GetCouponDetailRow
- type GetCouponTagsRow
- type GetCouponsFromCartParams
- type GetCouponsFromCartRow
- type GetGlobalCouponDetailRow
- type GetGlobalCouponsParams
- type GetGlobalCouponsRow
- type GetOrderDetailRow
- type GetOrderHistoryParams
- type GetOrderHistoryRow
- type GetOrderInfoParams
- type GetOrderInfoRow
- type GetProductFromCartOrderByPriceDescRow
- type GetProductInfoRow
- type GetProductTagsRow
- type GetProductsFromNearByShopRow
- type GetProductsFromPopularShopRow
- type GetRandomProductsParams
- type GetRandomProductsRow
- type GetShopCouponDetailsParams
- type GetShopCouponDetailsRow
- type GetShopCouponsParams
- type GetShopCouponsRow
- type GetShopInfoRow
- type GetShopProductsParams
- type GetShopProductsRow
- type GetSortedCouponsFromCartParams
- type GetSortedCouponsFromCartRow
- type GetSortedUsableCouponsParams
- type GetSortedUsableCouponsRow
- type GetTagInfoRow
- type GetTopSellerRow
- type GetUsersParams
- type GetUsersRow
- type HaveTagNameParams
- type NullCouponScope
- type NullCouponType
- type NullOrderStatus
- type NullRoleType
- type OrderDetail
- type OrderHistory
- type OrderStatus
- type Product
- type ProductArchive
- type ProductTag
- type Queries
- func (q *Queries) AddCoupon(ctx context.Context, arg AddCouponParams) (AddCouponRow, error)
- func (q *Queries) AddCouponToCart(ctx context.Context, arg AddCouponToCartParams) (int64, error)
- func (q *Queries) AddProductToCart(ctx context.Context, arg AddProductToCartParams) (int64, error)
- func (q *Queries) AddShop(ctx context.Context, arg AddShopParams) error
- func (q *Queries) AddUser(ctx context.Context, arg AddUserParams) error
- func (q *Queries) Checkout(ctx context.Context, arg CheckoutParams) error
- func (q *Queries) CouponExists(ctx context.Context, id int32) (bool, error)
- func (q *Queries) CreateAdmin(ctx context.Context, arg CreateAdminParams) error
- func (q *Queries) DeleteCoupon(ctx context.Context, id int32) (int64, error)
- func (q *Queries) DeleteCouponFromCart(ctx context.Context, arg DeleteCouponFromCartParams) (int64, error)
- func (q *Queries) DeleteEmptyCart(ctx context.Context, arg DeleteEmptyCartParams) error
- func (q *Queries) DeleteProductFromCart(ctx context.Context, arg DeleteProductFromCartParams) (bool, error)
- func (q *Queries) DeleteRefreshToken(ctx context.Context, refreshToken string) error
- func (q *Queries) DeleteTestUser(ctx context.Context) error
- func (q *Queries) DisableProductsFromShop(ctx context.Context, shopID int32) (int64, error)
- func (q *Queries) DisableShop(ctx context.Context, sellerName string) error
- func (q *Queries) DisableUser(ctx context.Context, username string) (int64, error)
- func (q *Queries) EditCoupon(ctx context.Context, arg EditCouponParams) (EditCouponRow, error)
- func (q *Queries) EnabledShop(ctx context.Context, sellerName string) (int64, error)
- func (q *Queries) FindUserByRefreshToken(ctx context.Context, refreshToken string) (FindUserByRefreshTokenRow, error)
- func (q *Queries) FindUserInfoAndPassword(ctx context.Context, username string) (FindUserInfoAndPasswordRow, error)
- func (q *Queries) GetCart(ctx context.Context, username string) ([]GetCartRow, error)
- func (q *Queries) GetCouponDetail(ctx context.Context, id int32) (GetCouponDetailRow, error)
- func (q *Queries) GetCouponTag(ctx context.Context, couponID int32) ([]int32, error)
- func (q *Queries) GetCouponTags(ctx context.Context, couponID int32) ([]GetCouponTagsRow, error)
- func (q *Queries) GetCouponsFromCart(ctx context.Context, arg GetCouponsFromCartParams) ([]GetCouponsFromCartRow, error)
- func (q *Queries) GetCreditCard(ctx context.Context, username string) (json.RawMessage, error)
- func (q *Queries) GetGlobalCouponDetail(ctx context.Context, id int32) (GetGlobalCouponDetailRow, error)
- func (q *Queries) GetGlobalCoupons(ctx context.Context, arg GetGlobalCouponsParams) ([]GetGlobalCouponsRow, error)
- func (q *Queries) GetOrderDetail(ctx context.Context, orderID int32) ([]GetOrderDetailRow, error)
- func (q *Queries) GetOrderHistory(ctx context.Context, arg GetOrderHistoryParams) ([]GetOrderHistoryRow, error)
- func (q *Queries) GetOrderInfo(ctx context.Context, arg GetOrderInfoParams) (GetOrderInfoRow, error)
- func (q *Queries) GetProductFromCartOrderByPriceDesc(ctx context.Context, cartID int32) ([]GetProductFromCartOrderByPriceDescRow, error)
- func (q *Queries) GetProductInfo(ctx context.Context, id int32) (GetProductInfoRow, error)
- func (q *Queries) GetProductTag(ctx context.Context, productID int32) ([]int32, error)
- func (q *Queries) GetProductTags(ctx context.Context, productID int32) ([]GetProductTagsRow, error)
- func (q *Queries) GetProductsFromNearByShop(ctx context.Context) ([]GetProductsFromNearByShopRow, error)
- func (q *Queries) GetProductsFromPopularShop(ctx context.Context) ([]GetProductsFromPopularShopRow, error)
- func (q *Queries) GetRandomProducts(ctx context.Context, arg GetRandomProductsParams) ([]GetRandomProductsRow, error)
- func (q *Queries) GetSellerNameByShopID(ctx context.Context, id int32) (string, error)
- func (q *Queries) GetShopCouponDetails(ctx context.Context, arg GetShopCouponDetailsParams) (GetShopCouponDetailsRow, error)
- func (q *Queries) GetShopCoupons(ctx context.Context, arg GetShopCouponsParams) ([]GetShopCouponsRow, error)
- func (q *Queries) GetShopIDBySellerName(ctx context.Context, sellerName string) (int32, error)
- func (q *Queries) GetShopInfo(ctx context.Context, sellerName string) (GetShopInfoRow, error)
- func (q *Queries) GetShopProducts(ctx context.Context, arg GetShopProductsParams) ([]GetShopProductsRow, error)
- func (q *Queries) GetSortedCouponsFromCart(ctx context.Context, arg GetSortedCouponsFromCartParams) ([]GetSortedCouponsFromCartRow, error)
- func (q *Queries) GetSortedUsableCoupons(ctx context.Context, arg GetSortedUsableCouponsParams) ([]GetSortedUsableCouponsRow, error)
- func (q *Queries) GetTagInfo(ctx context.Context, id int32) (GetTagInfoRow, error)
- func (q *Queries) GetTopSeller(ctx context.Context, date pgtype.Timestamptz) ([]GetTopSellerRow, error)
- func (q *Queries) GetTotalSales(ctx context.Context, date pgtype.Timestamptz) (int32, error)
- func (q *Queries) GetUserIDByUsername(ctx context.Context, username string) (int32, error)
- func (q *Queries) GetUsers(ctx context.Context, arg GetUsersParams) ([]GetUsersRow, error)
- func (q *Queries) HaveTagName(ctx context.Context, arg HaveTagNameParams) (bool, error)
- func (q *Queries) InsertTestUser(ctx context.Context, imageID pgtype.UUID) error
- func (q *Queries) SearchProducts(ctx context.Context, arg SearchProductsParams) ([]SearchProductsRow, error)
- func (q *Queries) SearchProductsByShop(ctx context.Context, arg SearchProductsByShopParams) ([]SearchProductsByShopRow, error)
- func (q *Queries) SearchShops(ctx context.Context, arg SearchShopsParams) ([]SearchShopsRow, error)
- func (q *Queries) SearchTestUser(ctx context.Context) (User, error)
- func (q *Queries) SellerBestSellProduct(ctx context.Context, arg SellerBestSellProductParams) ([]SellerBestSellProductRow, error)
- func (q *Queries) SellerCheckTags(ctx context.Context, arg SellerCheckTagsParams) (bool, error)
- func (q *Queries) SellerDeleteCoupon(ctx context.Context, arg SellerDeleteCouponParams) (int64, error)
- func (q *Queries) SellerDeleteCouponTag(ctx context.Context, arg SellerDeleteCouponTagParams) (int64, error)
- func (q *Queries) SellerDeleteProduct(ctx context.Context, arg SellerDeleteProductParams) (int64, error)
- func (q *Queries) SellerDeleteProductTag(ctx context.Context, arg SellerDeleteProductTagParams) (int64, error)
- func (q *Queries) SellerGetCoupon(ctx context.Context, arg SellerGetCouponParams) ([]SellerGetCouponRow, error)
- func (q *Queries) SellerGetCouponDetail(ctx context.Context, arg SellerGetCouponDetailParams) (SellerGetCouponDetailRow, error)
- func (q *Queries) SellerGetCouponTag(ctx context.Context, arg SellerGetCouponTagParams) ([]SellerGetCouponTagRow, error)
- func (q *Queries) SellerGetInfo(ctx context.Context, sellerName string) (SellerGetInfoRow, error)
- func (q *Queries) SellerGetOrder(ctx context.Context, arg SellerGetOrderParams) ([]SellerGetOrderRow, error)
- func (q *Queries) SellerGetOrderDetail(ctx context.Context, arg SellerGetOrderDetailParams) ([]SellerGetOrderDetailRow, error)
- func (q *Queries) SellerGetOrderHistory(ctx context.Context, arg SellerGetOrderHistoryParams) (SellerGetOrderHistoryRow, error)
- func (q *Queries) SellerGetProductDetail(ctx context.Context, arg SellerGetProductDetailParams) (SellerGetProductDetailRow, error)
- func (q *Queries) SellerGetProductTag(ctx context.Context, arg SellerGetProductTagParams) ([]SellerGetProductTagRow, error)
- func (q *Queries) SellerInsertCoupon(ctx context.Context, arg SellerInsertCouponParams) (SellerInsertCouponRow, error)
- func (q *Queries) SellerInsertCouponTag(ctx context.Context, arg SellerInsertCouponTagParams) (CouponTag, error)
- func (q *Queries) SellerInsertCouponTags(ctx context.Context, arg SellerInsertCouponTagsParams) error
- func (q *Queries) SellerInsertProduct(ctx context.Context, arg SellerInsertProductParams) (SellerInsertProductRow, error)
- func (q *Queries) SellerInsertProductTag(ctx context.Context, arg SellerInsertProductTagParams) (ProductTag, error)
- func (q *Queries) SellerInsertProductTags(ctx context.Context, arg SellerInsertProductTagsParams) error
- func (q *Queries) SellerInsertTag(ctx context.Context, arg SellerInsertTagParams) (SellerInsertTagRow, error)
- func (q *Queries) SellerProductList(ctx context.Context, arg SellerProductListParams) ([]SellerProductListRow, error)
- func (q *Queries) SellerReport(ctx context.Context, arg SellerReportParams) (SellerReportRow, error)
- func (q *Queries) SellerSearchTag(ctx context.Context, arg SellerSearchTagParams) ([]SellerSearchTagRow, error)
- func (q *Queries) SellerUpdateCouponInfo(ctx context.Context, arg SellerUpdateCouponInfoParams) (SellerUpdateCouponInfoRow, error)
- func (q *Queries) SellerUpdateInfo(ctx context.Context, arg SellerUpdateInfoParams) (SellerUpdateInfoRow, error)
- func (q *Queries) SellerUpdateOrderStatus(ctx context.Context, arg SellerUpdateOrderStatusParams) (SellerUpdateOrderStatusRow, error)
- func (q *Queries) SellerUpdateProductInfo(ctx context.Context, arg SellerUpdateProductInfoParams) (SellerUpdateProductInfoRow, error)
- func (q *Queries) SetRefreshToken(ctx context.Context, arg SetRefreshTokenParams) error
- func (q *Queries) ShopExists(ctx context.Context, sellerName string) (int32, error)
- func (q *Queries) TestDeleteCoupon(ctx context.Context) error
- func (q *Queries) TestDeleteCouponById(ctx context.Context, id int32) (Coupon, error)
- func (q *Queries) TestDeleteOrderById(ctx context.Context, id int32) (OrderHistory, error)
- func (q *Queries) TestDeleteOrderDetail(ctx context.Context) error
- func (q *Queries) TestDeleteOrderDetailByOrderId(ctx context.Context, arg TestDeleteOrderDetailByOrderIdParams) (OrderDetail, error)
- func (q *Queries) TestDeleteOrderHistory(ctx context.Context) error
- func (q *Queries) TestDeleteProduct(ctx context.Context) error
- func (q *Queries) TestDeleteProductArchive(ctx context.Context) error
- func (q *Queries) TestDeleteProductArchiveByIdVersion(ctx context.Context, arg TestDeleteProductArchiveByIdVersionParams) (ProductArchive, error)
- func (q *Queries) TestDeleteProductById(ctx context.Context, id int32) (Product, error)
- func (q *Queries) TestDeleteShop(ctx context.Context) error
- func (q *Queries) TestDeleteShopById(ctx context.Context, id int32) (Shop, error)
- func (q *Queries) TestDeleteTag(ctx context.Context) error
- func (q *Queries) TestDeleteTagById(ctx context.Context, id int32) (Tag, error)
- func (q *Queries) TestDeleteUser(ctx context.Context) error
- func (q *Queries) TestDeleteUserById(ctx context.Context, id int32) (TestDeleteUserByIdRow, error)
- func (q *Queries) TestInsertCart(ctx context.Context, arg TestInsertCartParams) (Cart, error)
- func (q *Queries) TestInsertCartCoupon(ctx context.Context, arg TestInsertCartCouponParams) (CartCoupon, error)
- func (q *Queries) TestInsertCartProduct(ctx context.Context, arg TestInsertCartProductParams) (CartProduct, error)
- func (q *Queries) TestInsertCoupon(ctx context.Context, arg TestInsertCouponParams) (Coupon, error)
- func (q *Queries) TestInsertCouponTag(ctx context.Context, arg TestInsertCouponTagParams) (CouponTag, error)
- func (q *Queries) TestInsertOrderDetail(ctx context.Context, arg TestInsertOrderDetailParams) (OrderDetail, error)
- func (q *Queries) TestInsertOrderHistory(ctx context.Context, arg TestInsertOrderHistoryParams) (OrderHistory, error)
- func (q *Queries) TestInsertProduct(ctx context.Context, arg TestInsertProductParams) (Product, error)
- func (q *Queries) TestInsertProductArchive(ctx context.Context, arg TestInsertProductArchiveParams) (ProductArchive, error)
- func (q *Queries) TestInsertProductTag(ctx context.Context, arg TestInsertProductTagParams) (ProductTag, error)
- func (q *Queries) TestInsertShop(ctx context.Context, arg TestInsertShopParams) (Shop, error)
- func (q *Queries) TestInsertTag(ctx context.Context, arg TestInsertTagParams) (Tag, error)
- func (q *Queries) TestInsertUser(ctx context.Context, arg TestInsertUserParams) (TestInsertUserRow, error)
- func (q *Queries) UpdateOrderStatus(ctx context.Context, arg UpdateOrderStatusParams) (int64, error)
- func (q *Queries) UpdateProductFromCart(ctx context.Context, arg UpdateProductFromCartParams) (int64, error)
- func (q *Queries) UpdateProductVersion(ctx context.Context, id int32) error
- func (q *Queries) UserExists(ctx context.Context, arg UserExistsParams) (bool, error)
- func (q *Queries) UserGetCreditCard(ctx context.Context, username string) (json.RawMessage, error)
- func (q *Queries) UserGetInfo(ctx context.Context, username string) (UserGetInfoRow, error)
- func (q *Queries) UserGetPassword(ctx context.Context, username string) (string, error)
- func (q *Queries) UserUpdateCreditCard(ctx context.Context, arg UserUpdateCreditCardParams) (json.RawMessage, error)
- func (q *Queries) UserUpdateInfo(ctx context.Context, arg UserUpdateInfoParams) (UserUpdateInfoRow, error)
- func (q *Queries) UserUpdatePassword(ctx context.Context, arg UserUpdatePasswordParams) (UserUpdatePasswordRow, error)
- func (q *Queries) ValidatePayment(ctx context.Context, arg ValidatePaymentParams) (bool, error)
- func (q *Queries) ValidateProductsInCart(ctx context.Context, arg ValidateProductsInCartParams) (pgtype.Bool, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RoleType
- type SearchProductsByShopParams
- type SearchProductsByShopRow
- type SearchProductsParams
- type SearchProductsRow
- type SearchShopsParams
- type SearchShopsRow
- type SellerBestSellProductParams
- type SellerBestSellProductRow
- type SellerCheckTagsParams
- type SellerDeleteCouponParams
- type SellerDeleteCouponTagParams
- type SellerDeleteProductParams
- type SellerDeleteProductTagParams
- type SellerGetCouponDetailParams
- type SellerGetCouponDetailRow
- type SellerGetCouponParams
- type SellerGetCouponRow
- type SellerGetCouponTagParams
- type SellerGetCouponTagRow
- type SellerGetInfoRow
- type SellerGetOrderDetailParams
- type SellerGetOrderDetailRow
- type SellerGetOrderHistoryParams
- type SellerGetOrderHistoryRow
- type SellerGetOrderParams
- type SellerGetOrderRow
- type SellerGetProductDetailParams
- type SellerGetProductDetailRow
- type SellerGetProductTagParams
- type SellerGetProductTagRow
- type SellerInsertCouponParams
- type SellerInsertCouponRow
- type SellerInsertCouponTagParams
- type SellerInsertCouponTagsParams
- type SellerInsertProductParams
- type SellerInsertProductRow
- type SellerInsertProductTagParams
- type SellerInsertProductTagsParams
- type SellerInsertTagParams
- type SellerInsertTagRow
- type SellerProductListParams
- type SellerProductListRow
- type SellerReportParams
- type SellerReportRow
- type SellerSearchTagParams
- type SellerSearchTagRow
- type SellerUpdateCouponInfoParams
- type SellerUpdateCouponInfoRow
- type SellerUpdateInfoParams
- type SellerUpdateInfoRow
- type SellerUpdateOrderStatusParams
- type SellerUpdateOrderStatusRow
- type SellerUpdateProductInfoParams
- type SellerUpdateProductInfoRow
- type SetRefreshTokenParams
- type Shop
- type Tag
- type TestDeleteOrderDetailByOrderIdParams
- type TestDeleteProductArchiveByIdVersionParams
- type TestDeleteUserByIdRow
- type TestInsertCartCouponParams
- type TestInsertCartParams
- type TestInsertCartProductParams
- type TestInsertCouponParams
- type TestInsertCouponTagParams
- type TestInsertOrderDetailParams
- type TestInsertOrderHistoryParams
- type TestInsertProductArchiveParams
- type TestInsertProductParams
- type TestInsertProductTagParams
- type TestInsertShopParams
- type TestInsertTagParams
- type TestInsertUserParams
- type TestInsertUserRow
- type UpdateOrderStatusParams
- type UpdateProductFromCartParams
- type User
- type UserExistsParams
- type UserGetInfoRow
- type UserUpdateCreditCardParams
- type UserUpdateInfoParams
- type UserUpdateInfoRow
- type UserUpdatePasswordParams
- type UserUpdatePasswordRow
- type ValidatePaymentParams
- type ValidateProductsInCartParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCouponParams ¶
type AddCouponParams struct { Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type AddCouponRow ¶
type AddCouponRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type AddCouponToCartParams ¶
type AddProductToCartParams ¶
type AddShopParams ¶
type AddUserParams ¶
type CartCoupon ¶
type CartProduct ¶
type CheckoutParams ¶
type Coupon ¶
type Coupon struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` ShopID pgtype.Int4 `json:"shop_id"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type CouponScope ¶
type CouponScope string
const ( CouponScopeGlobal CouponScope = "global" CouponScopeShop CouponScope = "shop" )
func (*CouponScope) Scan ¶
func (e *CouponScope) Scan(src interface{}) error
type CouponType ¶
type CouponType string
const ( CouponTypePercentage CouponType = "percentage" CouponTypeFixed CouponType = "fixed" CouponTypeShipping CouponType = "shipping" )
func (*CouponType) Scan ¶
func (e *CouponType) Scan(src interface{}) error
type CreateAdminParams ¶
type DeleteEmptyCartParams ¶
type EditCouponParams ¶
type EditCouponParams struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type EditCouponRow ¶
type EditCouponRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetCartRow ¶
type GetCouponDetailRow ¶
type GetCouponDetailRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetCouponTagsRow ¶
type GetCouponsFromCartRow ¶
type GetCouponsFromCartRow struct { ID int32 `json:"id" param:"id"` Name string `json:"name"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` }
type GetGlobalCouponDetailRow ¶
type GetGlobalCouponDetailRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetGlobalCouponsParams ¶
type GetGlobalCouponsRow ¶
type GetGlobalCouponsRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetOrderDetailRow ¶
type GetOrderHistoryParams ¶
type GetOrderHistoryRow ¶
type GetOrderHistoryRow struct { ID int32 `json:"id" param:"id"` ShopName string `form:"name" json:"shop_name"` ShopImageUrl string `json:"shop_image_url" swaggertype:"string"` ThumbnailUrl string `json:"thumbnail_url"` ProductName string `json:"product_name"` Shipment int32 `json:"shipment"` TotalPrice int32 `json:"total_price"` Status OrderStatus `json:"status"` CreatedAt pgtype.Timestamptz `json:"created_at" swaggertype:"string"` }
type GetOrderInfoParams ¶
type GetOrderInfoRow ¶
type GetOrderInfoRow struct { ID int32 `json:"id" param:"id"` ShopName string `form:"name" json:"shop_name"` ShopImageUrl string `json:"shop_image_url" swaggertype:"string"` Shipment int32 `json:"shipment"` TotalPrice int32 `json:"total_price"` Status OrderStatus `json:"status"` CreatedAt pgtype.Timestamptz `json:"created_at" swaggertype:"string"` Discount int32 `json:"discount"` }
type GetProductFromCartOrderByPriceDescRow ¶
type GetProductFromCartOrderByPriceDescRow struct { ProductID int32 `json:"product_id" param:"id"` Name string `form:"name" json:"name"` ImageUrl string `json:"image_url"` Price pgtype.Numeric `json:"price" swaggertype:"number"` Quantity int32 `json:"quantity"` Stock int32 `form:"stock" json:"stock"` Enabled bool `form:"enabled" json:"enabled"` }
type GetProductInfoRow ¶
type GetProductInfoRow struct { ID int32 `json:"id" param:"id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ProductImageUrl string `json:"product_image_url"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` Stock int32 `form:"stock" json:"stock"` Sales int32 `json:"sales"` ShopName string `form:"name" json:"shop_name"` ShopImageUrl string `json:"shop_image_url" swaggertype:"string"` SellerName string `json:"seller_name" param:"seller_name"` }
type GetProductTagsRow ¶
type GetRandomProductsParams ¶
type GetRandomProductsRow ¶
type GetShopCouponDetailsRow ¶
type GetShopCouponDetailsRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetShopCouponsParams ¶
type GetShopCouponsRow ¶
type GetShopCouponsRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetShopInfoRow ¶
type GetShopProductsParams ¶
type GetShopProductsRow ¶
type GetShopProductsRow struct { ID int32 `json:"id" param:"id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ImageUrl string `json:"image_url"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` Stock int32 `form:"stock" json:"stock"` Sales int32 `json:"sales"` }
type GetSortedCouponsFromCartRow ¶
type GetSortedCouponsFromCartRow struct { ID int32 `json:"id" param:"id"` Name string `json:"name"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetSortedUsableCouponsRow ¶
type GetSortedUsableCouponsRow struct { ID int32 `json:"id" param:"id"` Name string `json:"name"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type GetTagInfoRow ¶
type GetTopSellerRow ¶
type GetUsersParams ¶
type GetUsersRow ¶
type GetUsersRow struct { Username string `json:"username"` Name string `form:"name" json:"name"` Email string `form:"email" json:"email"` Address string `form:"address" json:"address"` IconUrl string `json:"icon_url" swaggertype:"string"` Role RoleType `json:"role"` CreditCard json.RawMessage `json:"credit_card"` Enabled bool `json:"enabled"` }
type HaveTagNameParams ¶
type NullCouponScope ¶
type NullCouponScope struct { CouponScope CouponScope `json:"coupon_scope"` Valid bool `json:"valid"` // Valid is true if CouponScope is not NULL }
func (*NullCouponScope) Scan ¶
func (ns *NullCouponScope) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullCouponType ¶
type NullCouponType struct { CouponType CouponType `json:"coupon_type"` Valid bool `json:"valid"` // Valid is true if CouponType is not NULL }
func (*NullCouponType) Scan ¶
func (ns *NullCouponType) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullOrderStatus ¶
type NullOrderStatus struct { OrderStatus OrderStatus `json:"order_status"` Valid bool `json:"valid"` // Valid is true if OrderStatus is not NULL }
func (*NullOrderStatus) Scan ¶
func (ns *NullOrderStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullRoleType ¶
type NullRoleType struct { RoleType RoleType `json:"role_type"` Valid bool `json:"valid"` // Valid is true if RoleType is not NULL }
func (*NullRoleType) Scan ¶
func (ns *NullRoleType) Scan(value interface{}) error
Scan implements the Scanner interface.
type OrderDetail ¶
type OrderHistory ¶
type OrderHistory struct { ID int32 `json:"id" param:"id"` UserID int32 `json:"user_id"` ShopID int32 `json:"shop_id"` Shipment int32 `json:"shipment"` TotalPrice int32 `json:"total_price"` Status OrderStatus `json:"status"` CreatedAt pgtype.Timestamptz `json:"created_at" swaggertype:"string"` }
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusPaid OrderStatus = "paid" OrderStatusShipped OrderStatus = "shipped" OrderStatusDelivered OrderStatus = "delivered" OrderStatusCancelled OrderStatus = "cancelled" OrderStatusFinished OrderStatus = "finished" )
func (*OrderStatus) Scan ¶
func (e *OrderStatus) Scan(src interface{}) error
type Product ¶
type Product struct { ID int32 `json:"id" param:"id"` Version int32 `json:"version"` ShopID int32 `json:"shop_id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ImageID string `json:"image_id"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` EditDate pgtype.Timestamptz `json:"edit_date" swaggertype:"string"` Stock int32 `form:"stock" json:"stock"` Sales int32 `json:"sales"` Enabled bool `form:"enabled" json:"enabled"` }
type ProductArchive ¶
type ProductTag ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddCoupon ¶
func (q *Queries) AddCoupon(ctx context.Context, arg AddCouponParams) (AddCouponRow, error)
func (*Queries) AddCouponToCart ¶
func (*Queries) AddProductToCart ¶
check product enabled ⬆️
func (*Queries) Checkout ¶
func (q *Queries) Checkout(ctx context.Context, arg CheckoutParams) error
func (*Queries) CouponExists ¶
func (*Queries) CreateAdmin ¶
func (q *Queries) CreateAdmin(ctx context.Context, arg CreateAdminParams) error
func (*Queries) DeleteCoupon ¶
func (*Queries) DeleteCouponFromCart ¶
func (*Queries) DeleteEmptyCart ¶
func (q *Queries) DeleteEmptyCart(ctx context.Context, arg DeleteEmptyCartParams) error
func (*Queries) DeleteProductFromCart ¶
func (*Queries) DeleteRefreshToken ¶
func (*Queries) DisableProductsFromShop ¶
func (*Queries) DisableShop ¶
func (*Queries) DisableUser ¶
func (*Queries) EditCoupon ¶
func (q *Queries) EditCoupon(ctx context.Context, arg EditCouponParams) (EditCouponRow, error)
func (*Queries) EnabledShop ¶
func (*Queries) FindUserByRefreshToken ¶
func (*Queries) FindUserInfoAndPassword ¶
func (q *Queries) FindUserInfoAndPassword(ctx context.Context, username string) (FindUserInfoAndPasswordRow, error)
user can enter both username and email to verify but writing "usernameOrEmail" is too long
func (*Queries) GetCouponDetail ¶
func (*Queries) GetCouponTag ¶
func (*Queries) GetCouponTags ¶
func (*Queries) GetCouponsFromCart ¶
func (q *Queries) GetCouponsFromCart(ctx context.Context, arg GetCouponsFromCartParams) ([]GetCouponsFromCartRow, error)
func (*Queries) GetCreditCard ¶
func (*Queries) GetGlobalCouponDetail ¶
func (*Queries) GetGlobalCoupons ¶
func (q *Queries) GetGlobalCoupons(ctx context.Context, arg GetGlobalCouponsParams) ([]GetGlobalCouponsRow, error)
func (*Queries) GetOrderDetail ¶
func (*Queries) GetOrderHistory ¶
func (q *Queries) GetOrderHistory(ctx context.Context, arg GetOrderHistoryParams) ([]GetOrderHistoryRow, error)
func (*Queries) GetOrderInfo ¶
func (q *Queries) GetOrderInfo(ctx context.Context, arg GetOrderInfoParams) (GetOrderInfoRow, error)
func (*Queries) GetProductFromCartOrderByPriceDesc ¶
func (*Queries) GetProductInfo ¶
func (*Queries) GetProductTag ¶
returning the number of products in any cart for US-SC-2 in SRS ⬆️
func (*Queries) GetProductTags ¶
func (*Queries) GetProductsFromNearByShop ¶
func (q *Queries) GetProductsFromNearByShop(ctx context.Context) ([]GetProductsFromNearByShopRow, error)
func (*Queries) GetProductsFromPopularShop ¶
func (q *Queries) GetProductsFromPopularShop(ctx context.Context) ([]GetProductsFromPopularShopRow, error)
func (*Queries) GetRandomProducts ¶
func (q *Queries) GetRandomProducts(ctx context.Context, arg GetRandomProductsParams) ([]GetRandomProductsRow, error)
func (*Queries) GetSellerNameByShopID ¶
func (*Queries) GetShopCouponDetails ¶
func (q *Queries) GetShopCouponDetails(ctx context.Context, arg GetShopCouponDetailsParams) (GetShopCouponDetailsRow, error)
func (*Queries) GetShopCoupons ¶
func (q *Queries) GetShopCoupons(ctx context.Context, arg GetShopCouponsParams) ([]GetShopCouponsRow, error)
func (*Queries) GetShopIDBySellerName ¶
func (*Queries) GetShopInfo ¶
func (*Queries) GetShopProducts ¶
func (q *Queries) GetShopProducts(ctx context.Context, arg GetShopProductsParams) ([]GetShopProductsRow, error)
func (*Queries) GetSortedCouponsFromCart ¶
func (q *Queries) GetSortedCouponsFromCart(ctx context.Context, arg GetSortedCouponsFromCartParams) ([]GetSortedCouponsFromCartRow, error)
func (*Queries) GetSortedUsableCoupons ¶
func (q *Queries) GetSortedUsableCoupons(ctx context.Context, arg GetSortedUsableCouponsParams) ([]GetSortedUsableCouponsRow, error)
func (*Queries) GetTagInfo ¶
func (*Queries) GetTopSeller ¶
func (q *Queries) GetTopSeller(ctx context.Context, date pgtype.Timestamptz) ([]GetTopSellerRow, error)
func (*Queries) GetTotalSales ¶
func (*Queries) GetUserIDByUsername ¶
func (*Queries) GetUsers ¶
func (q *Queries) GetUsers(ctx context.Context, arg GetUsersParams) ([]GetUsersRow, error)
func (*Queries) HaveTagName ¶
func (*Queries) InsertTestUser ¶
func (*Queries) SearchProducts ¶
func (q *Queries) SearchProducts(ctx context.Context, arg SearchProductsParams) ([]SearchProductsRow, error)
func (*Queries) SearchProductsByShop ¶
func (q *Queries) SearchProductsByShop(ctx context.Context, arg SearchProductsByShopParams) ([]SearchProductsByShopRow, error)
func (*Queries) SearchShops ¶
func (q *Queries) SearchShops(ctx context.Context, arg SearchShopsParams) ([]SearchShopsRow, error)
func (*Queries) SearchTestUser ¶
func (*Queries) SellerBestSellProduct ¶
func (q *Queries) SellerBestSellProduct(ctx context.Context, arg SellerBestSellProductParams) ([]SellerBestSellProductRow, error)
func (*Queries) SellerCheckTags ¶
func (*Queries) SellerDeleteCoupon ¶
func (*Queries) SellerDeleteCouponTag ¶
func (*Queries) SellerDeleteProduct ¶
func (*Queries) SellerDeleteProductTag ¶
func (*Queries) SellerGetCoupon ¶
func (q *Queries) SellerGetCoupon(ctx context.Context, arg SellerGetCouponParams) ([]SellerGetCouponRow, error)
func (*Queries) SellerGetCouponDetail ¶
func (q *Queries) SellerGetCouponDetail(ctx context.Context, arg SellerGetCouponDetailParams) (SellerGetCouponDetailRow, error)
func (*Queries) SellerGetCouponTag ¶
func (q *Queries) SellerGetCouponTag(ctx context.Context, arg SellerGetCouponTagParams) ([]SellerGetCouponTagRow, error)
func (*Queries) SellerGetInfo ¶
func (*Queries) SellerGetOrder ¶
func (q *Queries) SellerGetOrder(ctx context.Context, arg SellerGetOrderParams) ([]SellerGetOrderRow, error)
func (*Queries) SellerGetOrderDetail ¶
func (q *Queries) SellerGetOrderDetail(ctx context.Context, arg SellerGetOrderDetailParams) ([]SellerGetOrderDetailRow, error)
func (*Queries) SellerGetOrderHistory ¶
func (q *Queries) SellerGetOrderHistory(ctx context.Context, arg SellerGetOrderHistoryParams) (SellerGetOrderHistoryRow, error)
func (*Queries) SellerGetProductDetail ¶
func (q *Queries) SellerGetProductDetail(ctx context.Context, arg SellerGetProductDetailParams) (SellerGetProductDetailRow, error)
func (*Queries) SellerGetProductTag ¶
func (q *Queries) SellerGetProductTag(ctx context.Context, arg SellerGetProductTagParams) ([]SellerGetProductTagRow, error)
func (*Queries) SellerInsertCoupon ¶
func (q *Queries) SellerInsertCoupon(ctx context.Context, arg SellerInsertCouponParams) (SellerInsertCouponRow, error)
func (*Queries) SellerInsertCouponTag ¶
func (*Queries) SellerInsertCouponTags ¶
func (q *Queries) SellerInsertCouponTags(ctx context.Context, arg SellerInsertCouponTagsParams) error
func (*Queries) SellerInsertProduct ¶
func (q *Queries) SellerInsertProduct(ctx context.Context, arg SellerInsertProductParams) (SellerInsertProductRow, error)
func (*Queries) SellerInsertProductTag ¶
func (q *Queries) SellerInsertProductTag(ctx context.Context, arg SellerInsertProductTagParams) (ProductTag, error)
func (*Queries) SellerInsertProductTags ¶
func (q *Queries) SellerInsertProductTags(ctx context.Context, arg SellerInsertProductTagsParams) error
func (*Queries) SellerInsertTag ¶
func (q *Queries) SellerInsertTag(ctx context.Context, arg SellerInsertTagParams) (SellerInsertTagRow, error)
func (*Queries) SellerProductList ¶
func (q *Queries) SellerProductList(ctx context.Context, arg SellerProductListParams) ([]SellerProductListRow, error)
func (*Queries) SellerReport ¶
func (q *Queries) SellerReport(ctx context.Context, arg SellerReportParams) (SellerReportRow, error)
func (*Queries) SellerSearchTag ¶
func (q *Queries) SellerSearchTag(ctx context.Context, arg SellerSearchTagParams) ([]SellerSearchTagRow, error)
func (*Queries) SellerUpdateCouponInfo ¶
func (q *Queries) SellerUpdateCouponInfo(ctx context.Context, arg SellerUpdateCouponInfoParams) (SellerUpdateCouponInfoRow, error)
func (*Queries) SellerUpdateInfo ¶
func (q *Queries) SellerUpdateInfo(ctx context.Context, arg SellerUpdateInfoParams) (SellerUpdateInfoRow, error)
func (*Queries) SellerUpdateOrderStatus ¶
func (q *Queries) SellerUpdateOrderStatus(ctx context.Context, arg SellerUpdateOrderStatusParams) (SellerUpdateOrderStatusRow, error)
func (*Queries) SellerUpdateProductInfo ¶
func (q *Queries) SellerUpdateProductInfo(ctx context.Context, arg SellerUpdateProductInfoParams) (SellerUpdateProductInfoRow, error)
func (*Queries) SetRefreshToken ¶
func (q *Queries) SetRefreshToken(ctx context.Context, arg SetRefreshTokenParams) error
func (*Queries) ShopExists ¶
func (*Queries) TestDeleteCouponById ¶
func (*Queries) TestDeleteOrderById ¶
func (*Queries) TestDeleteOrderDetail ¶
func (*Queries) TestDeleteOrderDetailByOrderId ¶
func (q *Queries) TestDeleteOrderDetailByOrderId(ctx context.Context, arg TestDeleteOrderDetailByOrderIdParams) (OrderDetail, error)
func (*Queries) TestDeleteOrderHistory ¶
func (*Queries) TestDeleteProductArchive ¶
func (*Queries) TestDeleteProductArchiveByIdVersion ¶
func (q *Queries) TestDeleteProductArchiveByIdVersion(ctx context.Context, arg TestDeleteProductArchiveByIdVersionParams) (ProductArchive, error)
func (*Queries) TestDeleteProductById ¶
func (*Queries) TestDeleteShopById ¶
func (*Queries) TestDeleteTagById ¶
func (*Queries) TestDeleteUserById ¶
func (*Queries) TestInsertCart ¶
func (*Queries) TestInsertCartCoupon ¶
func (q *Queries) TestInsertCartCoupon(ctx context.Context, arg TestInsertCartCouponParams) (CartCoupon, error)
func (*Queries) TestInsertCartProduct ¶
func (q *Queries) TestInsertCartProduct(ctx context.Context, arg TestInsertCartProductParams) (CartProduct, error)
func (*Queries) TestInsertCoupon ¶
func (*Queries) TestInsertCouponTag ¶
func (*Queries) TestInsertOrderDetail ¶
func (q *Queries) TestInsertOrderDetail(ctx context.Context, arg TestInsertOrderDetailParams) (OrderDetail, error)
func (*Queries) TestInsertOrderHistory ¶
func (q *Queries) TestInsertOrderHistory(ctx context.Context, arg TestInsertOrderHistoryParams) (OrderHistory, error)
func (*Queries) TestInsertProduct ¶
func (*Queries) TestInsertProductArchive ¶
func (q *Queries) TestInsertProductArchive(ctx context.Context, arg TestInsertProductArchiveParams) (ProductArchive, error)
func (*Queries) TestInsertProductTag ¶
func (q *Queries) TestInsertProductTag(ctx context.Context, arg TestInsertProductTagParams) (ProductTag, error)
func (*Queries) TestInsertShop ¶
func (*Queries) TestInsertTag ¶
func (*Queries) TestInsertUser ¶
func (q *Queries) TestInsertUser(ctx context.Context, arg TestInsertUserParams) (TestInsertUserRow, error)
func (*Queries) UpdateOrderStatus ¶
func (*Queries) UpdateProductFromCart ¶
func (*Queries) UpdateProductVersion ¶
func (*Queries) UserExists ¶
func (*Queries) UserGetCreditCard ¶
func (*Queries) UserGetInfo ¶
func (*Queries) UserGetPassword ¶
func (*Queries) UserUpdateCreditCard ¶
func (q *Queries) UserUpdateCreditCard(ctx context.Context, arg UserUpdateCreditCardParams) (json.RawMessage, error)
func (*Queries) UserUpdateInfo ¶
func (q *Queries) UserUpdateInfo(ctx context.Context, arg UserUpdateInfoParams) (UserUpdateInfoRow, error)
func (*Queries) UserUpdatePassword ¶
func (q *Queries) UserUpdatePassword(ctx context.Context, arg UserUpdatePasswordParams) (UserUpdatePasswordRow, error)
func (*Queries) ValidatePayment ¶
func (*Queries) ValidateProductsInCart ¶
type SearchProductsByShopParams ¶
type SearchProductsByShopParams struct { SellerName string `json:"seller_name" param:"seller_name"` Query string `json:"query"` MinPrice pgtype.Numeric `json:"min_price"` MaxPrice pgtype.Numeric `json:"max_price"` MinStock pgtype.Int4 `json:"min_stock"` MaxStock pgtype.Int4 `json:"max_stock"` HasCoupon pgtype.Bool `json:"has_coupon"` SortBy string `json:"sort_by"` Order string `json:"order"` Offset int32 `json:"offset"` Limit int32 `json:"limit"` }
type SearchProductsByShopRow ¶
type SearchProductsParams ¶
type SearchProductsParams struct { Query string `json:"query"` MinPrice pgtype.Numeric `json:"min_price"` MaxPrice pgtype.Numeric `json:"max_price"` MinStock pgtype.Int4 `json:"min_stock"` MaxStock pgtype.Int4 `json:"max_stock"` HasCoupon pgtype.Bool `json:"has_coupon"` SortBy string `json:"sort_by"` Order string `json:"order"` Offset int32 `json:"offset"` Limit int32 `json:"limit"` }
type SearchProductsRow ¶
type SearchShopsParams ¶
type SearchShopsRow ¶
type SellerBestSellProductParams ¶
type SellerBestSellProductParams struct { SellerName string `json:"seller_name" param:"seller_name"` Limit int64 `json:"limit"` Time pgtype.Timestamptz `json:"time" swaggertype:"string"` }
type SellerBestSellProductRow ¶
type SellerBestSellProductRow struct { ProductID int32 `json:"product_id"` Name string `json:"name"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ImageUrl string `json:"image_url"` TotalQuantity int64 `json:"total_quantity"` TotalSell pgtype.Numeric `json:"total_sell"` OrderCount int64 `json:"order_count"` }
type SellerCheckTagsParams ¶
type SellerGetCouponDetailRow ¶
type SellerGetCouponDetailRow struct { Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` Description string `json:"description"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type SellerGetCouponParams ¶
type SellerGetCouponRow ¶
type SellerGetCouponRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type SellerGetCouponTagRow ¶
type SellerGetInfoRow ¶
type SellerGetOrderDetailRow ¶
type SellerGetOrderHistoryRow ¶
type SellerGetOrderHistoryRow struct { ID int32 `json:"id" param:"id"` Shipment int32 `json:"shipment"` TotalPrice int32 `json:"total_price"` Status OrderStatus `json:"status"` CreatedAt pgtype.Timestamptz `json:"created_at" swaggertype:"string"` UserID int32 `json:"user_id" param:"id"` UserName string `form:"name" json:"user_name"` UserImageUrl string `json:"user_image_url" swaggertype:"string"` }
type SellerGetOrderParams ¶
type SellerGetOrderRow ¶
type SellerGetOrderRow struct { ID int32 `json:"id" param:"id"` ProductName string `json:"product_name"` ThumbnailUrl string `json:"thumbnail_url"` UserName string `form:"name" json:"user_name"` UserImageUrl string `json:"user_image_url" swaggertype:"string"` Shipment int32 `json:"shipment"` TotalPrice int32 `json:"total_price"` Status OrderStatus `json:"status"` CreatedAt pgtype.Timestamptz `json:"created_at" swaggertype:"string"` }
type SellerGetProductDetailRow ¶
type SellerGetProductDetailRow struct { ID int32 `json:"id" param:"id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` ImageUrl string `json:"image_url"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` Price pgtype.Numeric `json:"price" swaggertype:"number"` Sales int32 `json:"sales"` Stock int32 `form:"stock" json:"stock"` Enabled bool `form:"enabled" json:"enabled"` }
type SellerGetProductTagRow ¶
type SellerInsertCouponParams ¶
type SellerInsertCouponParams struct { SellerName string `json:"seller_name" param:"seller_name"` Type CouponType `json:"type"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type SellerInsertCouponRow ¶
type SellerInsertCouponRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` Description string `json:"description"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type SellerInsertProductParams ¶
type SellerInsertProductParams struct { SellerName string `json:"seller_name" param:"seller_name"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ImageID string `json:"image_id"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` Stock int32 `form:"stock" json:"stock"` Enabled bool `form:"enabled" json:"enabled"` }
type SellerInsertProductRow ¶
type SellerInsertProductRow struct { ID int32 `json:"id" param:"id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ImageUrl string `json:"image_url"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` EditDate pgtype.Timestamptz `json:"edit_date" swaggertype:"string"` Stock int32 `form:"stock" json:"stock"` Sales int32 `json:"sales"` Enabled bool `form:"enabled" json:"enabled"` }
type SellerInsertTagParams ¶
type SellerInsertTagRow ¶
type SellerProductListParams ¶
type SellerProductListRow ¶
type SellerProductListRow struct { ID int32 `json:"id" param:"id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` ImageUrl string `json:"image_url"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` Price pgtype.Numeric `json:"price" swaggertype:"number"` Sales int32 `json:"sales"` Stock int32 `form:"stock" json:"stock"` Enabled bool `form:"enabled" json:"enabled"` }
type SellerReportParams ¶
type SellerReportParams struct { SellerName string `json:"seller_name" param:"seller_name"` Time pgtype.Timestamptz `json:"time" swaggertype:"string"` }
type SellerReportRow ¶
type SellerSearchTagParams ¶
type SellerSearchTagRow ¶
type SellerUpdateCouponInfoParams ¶
type SellerUpdateCouponInfoParams struct { SellerName string `json:"seller_name" param:"seller_name"` ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type SellerUpdateCouponInfoRow ¶
type SellerUpdateCouponInfoRow struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type SellerUpdateInfoParams ¶
type SellerUpdateInfoRow ¶
type SellerUpdateOrderStatusParams ¶
type SellerUpdateOrderStatusParams struct { SellerName string `json:"seller_name" param:"seller_name"` ID int32 `json:"id" param:"id"` SetStatus OrderStatus `json:"set_status"` CurrentStatus OrderStatus `json:"current_status"` }
type SellerUpdateOrderStatusRow ¶
type SellerUpdateOrderStatusRow struct { ID int32 `json:"id" param:"id"` Shipment int32 `json:"shipment"` TotalPrice int32 `json:"total_price"` Status OrderStatus `json:"status"` CreatedAt pgtype.Timestamptz `json:"created_at" swaggertype:"string"` }
type SellerUpdateProductInfoParams ¶
type SellerUpdateProductInfoParams struct { SellerName string `json:"seller_name" param:"seller_name"` ID int32 `json:"id" param:"id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` Enabled bool `form:"enabled" json:"enabled"` Stock int32 `form:"stock" json:"stock"` ImageID string `json:"image_id"` }
type SellerUpdateProductInfoRow ¶
type SellerUpdateProductInfoRow struct { ID int32 `json:"id" param:"id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ImageUrl string `json:"image_url"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` EditDate pgtype.Timestamptz `json:"edit_date" swaggertype:"string"` Stock int32 `form:"stock" json:"stock"` Sales int32 `json:"sales"` Enabled bool `form:"enabled" json:"enabled"` }
type SetRefreshTokenParams ¶
type SetRefreshTokenParams struct { RefreshToken string `json:"refresh_token"` ExpireDate pgtype.Timestamptz `json:"expire_date"` Username string `json:"username"` }
type TestDeleteUserByIdRow ¶
type TestDeleteUserByIdRow struct { ID int32 `json:"id" param:"id"` Username string `json:"username"` Password string `json:"password"` Name string `form:"name" json:"name"` Email string `form:"email" json:"email"` Address string `form:"address" json:"address"` ImageID string `json:"image_id" swaggertype:"string"` Role RoleType `json:"role"` CreditCard json.RawMessage `json:"credit_card"` Enabled bool `json:"enabled"` }
type TestInsertCartParams ¶
type TestInsertCouponParams ¶
type TestInsertCouponParams struct { ID int32 `json:"id" param:"id"` Type CouponType `json:"type"` Scope CouponScope `json:"scope"` ShopID pgtype.Int4 `json:"shop_id"` Name string `json:"name"` Description string `json:"description"` Discount pgtype.Numeric `json:"discount" swaggertype:"number"` StartDate pgtype.Timestamptz `json:"start_date" swaggertype:"string"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` }
type TestInsertProductParams ¶
type TestInsertProductParams struct { ID int32 `json:"id" param:"id"` Version int32 `json:"version"` ShopID int32 `json:"shop_id"` Name string `form:"name" json:"name"` Description string `form:"description" json:"description"` Price pgtype.Numeric `json:"price" swaggertype:"number"` ImageID string `json:"image_id"` ExpireDate pgtype.Timestamptz `json:"expire_date" swaggertype:"string"` Stock int32 `form:"stock" json:"stock"` Sales int32 `json:"sales"` Enabled bool `form:"enabled" json:"enabled"` }
type TestInsertShopParams ¶
type TestInsertShopParams struct { ID int32 `json:"id"` SellerName string `json:"seller_name" param:"seller_name"` Name string `form:"name" json:"name"` ImageID string `json:"image_id" swaggertype:"string"` Description string `form:"description" json:"description"` Enabled bool `form:"enabled" json:"enabled"` }
type TestInsertTagParams ¶
type TestInsertUserParams ¶
type TestInsertUserParams struct { ID int32 `json:"id" param:"id"` Username string `json:"username"` Password string `json:"password"` Name string `form:"name" json:"name"` Email string `form:"email" json:"email"` Address string `form:"address" json:"address"` ImageID string `json:"image_id" swaggertype:"string"` Role RoleType `json:"role"` CreditCard json.RawMessage `json:"credit_card"` Enabled bool `json:"enabled"` }
type TestInsertUserRow ¶
type TestInsertUserRow struct { ID int32 `json:"id" param:"id"` Username string `json:"username"` Password string `json:"password"` Name string `form:"name" json:"name"` Email string `form:"email" json:"email"` Address string `form:"address" json:"address"` ImageID string `json:"image_id" swaggertype:"string"` Role RoleType `json:"role"` CreditCard json.RawMessage `json:"credit_card"` Enabled bool `json:"enabled"` }
type UpdateOrderStatusParams ¶
type UpdateOrderStatusParams struct { Status NullOrderStatus `json:"status"` ID pgtype.Int4 `json:"id"` Username string `json:"username"` }
type User ¶
type User struct { ID int32 `json:"id" param:"id"` Username string `json:"username"` Password string `json:"password"` Name string `form:"name" json:"name"` Email string `form:"email" json:"email"` Address string `form:"address" json:"address"` ImageID string `json:"image_id" swaggertype:"string"` Role RoleType `json:"role"` CreditCard json.RawMessage `json:"credit_card"` RefreshToken string `json:"refresh_token"` Enabled bool `json:"enabled"` RefreshTokenExpireDate pgtype.Timestamptz `json:"refresh_token_expire_date"` }
type UserExistsParams ¶
type UserGetInfoRow ¶
type UserUpdateCreditCardParams ¶
type UserUpdateCreditCardParams struct { Username string `json:"username"` CreditCard json.RawMessage `json:"credit_card"` }
type UserUpdateInfoParams ¶
type UserUpdateInfoRow ¶
type UserUpdatePasswordRow ¶
type ValidatePaymentParams ¶
type ValidatePaymentParams struct { Username string `json:"username"` CreditCard json.RawMessage `json:"credit_card"` }
Click to show internal directories.
Click to hide internal directories.