Documentation ¶
Index ¶
- Variables
- func ErrorResponse(ctx *gin.Context, statusCode int, message string, err error, data interface{})
- func SuccessResponse(ctx *gin.Context, statusCode int, message string, data ...interface{})
- type Address
- type AdminLogin
- type Cart
- type CartItem
- type Category
- type CheckOut
- type EmailAndPhone
- type OTPResponse
- type OfferCategory
- type OfferProduct
- type OrderItem
- type OrderPayment
- type OrderReturn
- type PlaceOrder
- type Product
- type ProductItems
- type ProductVariationValue
- type RazorpayOrder
- type Response
- type SalesReport
- type ShopOrder
- type Stock
- type StripeOrder
- type SubCategory
- type TokenResponse
- type User
- type UserCoupon
- type UserOrder
- type Variation
- type VariationOption
- type WishListItem
Constants ¶
This section is empty.
Variables ¶
View Source
var ResoposeMap map[string]string
Functions ¶
func ErrorResponse ¶
Types ¶
type Address ¶
type Address struct { ID uint `json:"address_id"` Name string `json:"name"` PhoneNumber string `json:"phone_number"` House string `json:"house"` Area string `json:"area"` LandMark string `json:"land_mark"` City string `json:"city"` Pincode uint `json:"pincode"` CountryID uint `json:"country_id"` CountryName string `json:"country_name"` IsDefault *bool `json:"is_default"` }
address
type AdminLogin ¶
type AdminLogin struct { ID uint `json:"id" ` UserName string `json:"user_name"` Email string `json:"email"` }
admin
type Category ¶
type Category struct { ID uint `json:"category_id"` Name string `json:"category_name"` SubCategory []SubCategory `json:"sub_category" gorm:"-"` }
for a specific category representation
type CheckOut ¶
type CheckOut struct { Addresses []Address `json:"addresses"` ProductItems []CartItem `json:"product_items"` TotalPrice uint `json:"total_price"` }
checkout
type EmailAndPhone ¶
type OTPResponse ¶
type OTPResponse struct {
OtpID string `json:"otp_id"`
}
type OfferCategory ¶
type OfferCategory struct { OfferCategoryID uint `json:"offer_category_id"` CategoryID uint `json:"category_id"` CategoryName string `json:"category_name"` DiscountRate uint `json:"discount_rate"` OfferID uint `json:"offer_id"` OfferName string `json:"offer_name"` }
offer response
type OfferProduct ¶
type OrderPayment ¶
type OrderPayment struct { PaymentType domain.PaymentType `json:"payment_type"` PaymentOrder any `json:"payment_order"` }
type OrderReturn ¶
type OrderReturn struct { OrderReturnID uint `json:"order_return_id" copier:"ID"` ShopOrderID uint `json:"shop_order_id"` RequestDate time.Time `json:"request_date" ` ReturnReason string `json:"return_reason" ` RefundAmount uint `json:"refund_amount" ` OrderStatusID uint `json:"order_status_id"` OrderStatus string `json:"order_status"` IsApproved bool `json:"is_approved" ` ReturnDate time.Time `json:"return_date"` ApprovalDate time.Time `json:"approval_date"` AdminComment string `json:"admin_comment"` }
return
type PlaceOrder ¶
type Product ¶
type Product struct { ID uint `json:"product_id"` CategoryID uint `json:"category_id"` Price uint `json:"price"` DiscountPrice uint `json:"discount_price"` Name string `json:"product_name"` Description string `json:"description" ` CategoryName string `json:"category_name"` MainCategoryName string `json:"main_category_name"` BrandID uint `json:"brand_id"` BrandName string `json:"brand_name"` Image string `json:"image"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
response for product
type ProductItems ¶
type ProductItems struct { ID uint `json:"product_item_id"` Name string `json:"product_name"` ProductID uint `json:"product_id"` Price uint `json:"price"` DiscountPrice uint `json:"discount_price"` SKU string `json:"sku"` QtyInStock uint `json:"qty_in_stock"` CategoryName string `json:"category_name"` MainCategoryName string `json:"main_category_name"` BrandID uint `json:"brand_id"` BrandName string `json:"brand_name"` VariationValues []ProductVariationValue `json:"variation_values" gorm:"-"` Images []string `json:"images" gorm:"-"` }
for response a specific products all product items
type ProductVariationValue ¶
type RazorpayOrder ¶
type RazorpayOrder struct { RazorpayKey string `json:"razorpay_key"` UserID uint `json:"user_id"` AmountToPay uint `json:"amount_to_pay"` RazorpayAmount uint `json:"razorpay_amount"` RazorpayOrderID interface{} `json:"razorpay_order_id"` Email string `json:"email"` Phone string `json:"phone"` ShopOrderID uint `json:"shop_order_id"` }
razorpay
type SalesReport ¶
type SalesReport struct { UserID uint `json:"user_id"` FirstName string `json:"first_name"` Email string `json:"email"` ShopOrderID uint `json:"order_id"` OrderDate time.Time `json:"order_date"` OrderTotalPrice uint `json:"order_total_price"` Discount uint `json:"discount_price"` OrderStatus string `json:"order_status"` PaymentType string `json:"payment_type"` }
type ShopOrder ¶
type ShopOrder struct { UserID uint `json:"user_id"` ShopOrderID uint `json:"shop_order_id"` OrderDate time.Time `json:"order_date"` AddressID uint `json:"address_id" ` Address Address `json:"address"` OrderTotalPrice uint `json:"order_total_price" ` Discount uint `json:"discount"` OrderStatusID uint `json:"order_status_id"` OrderStatus string `json:"order_status"` PaymentMethodID uint `json:"payment_method_id" gorm:"primaryKey;not null"` PaymentMethodName string `json:"payment_method_name" gorm:"unique;not null"` }
type StripeOrder ¶
type SubCategory ¶
type TokenResponse ¶
type User ¶
type User struct { ID uint `json:"id" copier:"must"` GoogleImage string `json:"google_profile_image"` FirstName string `json:"first_name" copier:"must"` LastName string `json:"last_name" copier:"must"` Age uint `json:"age" copier:"must"` Email string `json:"email" copier:"must"` UserName string `json:"user_name" copire:"must"` Phone string `json:"phone" copier:"must"` Verified bool `json:"verified"` BlockStatus bool `json:"block_status" copier:"must"` CreatedAt time.Time `json:"created_at" gorm:"not null"` UpdatedAt time.Time `json:"updated_at"` }
user details response
type UserCoupon ¶
type UserCoupon struct { CouponID uint `json:"coupon_id"` CouponCode string `json:"coupon_code" ` CouponName string `json:"coupon_name"` ExpireDate time.Time `json:"expire_date"` Description string `json:"description"` DiscountRate uint `json:"discount_rate"` MinimumCartPrice uint `json:"minimum_cart_price"` Image string `json:"image" binding:"required"` BlockStatus bool `json:"block_status"` Used bool `json:"used"` UsedAt time.Time `json:"used_at"` }
type Variation ¶
type Variation struct { ID uint `json:"variation_id"` Name string `json:"variation_name"` VariationOptions []VariationOption `gorm:"-"` }
for a specific variation representation
type VariationOption ¶
type VariationOption struct { ID uint `json:"variation_option_id"` Value string `json:"variation_value"` }
for a specific variation Value representation
type WishListItem ¶
type WishListItem struct { ID uint `json:"wish_list_id"` ProductItemID uint `json:"product_item_id"` Name string `json:"product_name"` ProductID uint `json:"product_id"` Price uint `json:"price"` DiscountPrice uint `json:"discount_price"` SKU string `json:"sku"` QtyInStock uint `json:"qty_in_stock"` VariationValues []ProductVariationValue `gorm:"-"` }
wish list response
Click to show internal directories.
Click to hide internal directories.