response

package
v0.0.0-...-4c8fc35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartProducts

type CartProducts struct {
	ProductID       string `json:"product_id" db:"product_id"`
	ID              string `json:"id" db:"id"`
	Name            string `json:"name" db:"name"`
	Price           int64  `json:"price" db:"price"`
	DiscountPrice   int64  `json:"discount_price"`
	Quantity        int32  `json:"quantity" db:"quantity"`
	PhotoUrl        string `json:"photo_url" db:"photo_url"`
	ProductIDString string `json:"-" db:"product_id_string"`
}

type Education

type Education struct {
	MainArticle  EducationCard   `json:"main_article"`
	Latest       []EducationCard `json:"latest"`
	MustRead     []EducationCard `json:"must_read"`
	DiscoverMore struct {
		Data       []EducationCard `json:"data"`
		Pagination Pagination      `json:"pagination"`
	} `json:"discover_more"`
}

type EducationCard

type EducationCard struct {
	ID              string `json:"id" db:"id"`
	PhotoUrl        string `json:"photo_url" db:"photo_url"`
	Title           string `json:"title" db:"title"`
	Content         string `json:"content" db:"content"`
	PhotoUrlAuthor  string `json:"photo_url_author" db:"photo_url_author"`
	Author          string `json:"author" db:"author"`
	CreatedAt       int64  `json:"-" db:"created_at"`
	CreatedAtString string `json:"created_at"`
	CountLikes      int64  `json:"count_likes"`
	CountViews      int64  `json:"count_views"`
	CountComments   int64  `json:"count_comments"`
	InWishlist      bool   `json:"in_wishlist"`
}

type EducationData

type EducationData struct {
	ID              string `json:"id" db:"id"`
	Title           string `json:"title" db:"title"`
	PhotoUrl        string `json:"photo_url" db:"photo_url"`
	Author          string `json:"author" db:"author"`
	PhotoUrlAuthor  string `json:"photo_url_author" db:"photo_url_author"`
	Content         string `json:"content" db:"content"`
	CreatedAt       int64  `json:"-" db:"created_at"`
	CreatedAtString string `json:"created_at"`
}

type EducationDetails

type EducationDetails struct {
	UserDetails    UserDetails   `json:"user_details"`
	Data           EducationData `json:"data"`
	RelatedArticle struct {
		Data       []EducationCard `json:"data"`
		Pagination Pagination      `json:"pagination"`
	} `json:"related_article"`
}

type EducationsHomePage

type EducationsHomePage struct {
	ID              string `json:"id" db:"id"`
	Title           string `json:"title" db:"title"`
	PhotoUrl        string `json:"photo_url" db:"photo_url"`
	PhotoUrlAuthor  string `json:"photo_url_author" db:"photo_url_author"`
	NameOfAuthor    string `json:"name_of_author" db:"name"`
	CreatedAt       int64  `json:"-" db:"created_at"`
	CreatedAtString string `json:"created_at"`
	CountLikes      int64  `json:"count_likes"`
	CountViews      int64  `json:"count_views"`
	CountComments   int64  `json:"count_comments"`
	InWishlist      bool   `json:"in_wishlist"`
}

type FetchFacebookProfile

type FetchFacebookProfile struct {
	ID      string  `json:"id"`
	Name    string  `json:"name"`
	Email   string  `json:"email"`
	Picture Picture `json:"picture"`
}

type FetchGoogleProfile

type FetchGoogleProfile struct {
	Email   string `json:"email"`
	Name    string `json:"name"`
	Picture string `json:"picture"`
}

type Final

type Final struct {
	Message string `json:"message"`
	Data    any    `json:"data"`
	Errors  any    `json:"errors"`
	Status  Status `json:"status"`
}

type FinishRegister

type FinishRegister struct {
	//
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"-"`
}

type GetAllProperties

type GetAllProperties struct {
	//
	Province string          `json:"province"`
	Data     []GetProperties `json:"data"`
}

type GetProduct

type GetProduct struct {
	ID              string  `json:"id" db:"id"`
	Name            string  `json:"name" db:"name"`
	Price           int64   `json:"price" db:"price"`
	DiscountPrice   int64   `json:"discount_price"`
	CategoryName    string  `json:"category_name" db:"category_name"`
	Ratings         float32 `json:"ratings" db:"ratings"`
	IsWishlisted    bool    `json:"in_wishlist" db:"is_wishlisted"`
	PhotoUrl        string  `json:"photo_url" db:"photo_url"`
	ProductIDString string  `json:"-" db:"product_id_string"`

	// unused key
	Description          string `json:"-" db:"description"`
	Quantity             uint   `json:"-" db:"quantity"`
	UnitWeight           int32  `json:"-" db:"unit_weight"`
	ShelfLife            string `json:"-" db:"shelf_life"`
	OrganicCertification string `json:"-" db:"organic_certification"`
	CreatedAt            int64  `json:"-" db:"created_at"`
	UpdatedAt            int64  `json:"-" db:"updated_at"`
	CategoryID           string `json:"-" db:"category_id"`
}

type GetProductDetails

type GetProductDetails struct {
	//
	UserDetails          UserDetails `json:"user_details"`
	ID                   string      `json:"id" db:"id"`
	Name                 string      `json:"name" db:"name"`
	IsWishlisted         bool        `json:"in_wishlist" db:"is_wishlisted"`
	PhotoUrls            []string    `json:"photo_urls"`
	Price                int64       `json:"price" db:"price"`
	DiscountPrice        int64       `json:"discount_price"`
	Quantity             uint        `json:"stock" db:"quantity"`
	CategoryName         string      `json:"category_name" db:"category_name"`
	UnitWeight           int32       `json:"weight" db:"unit_weight"`
	ShelfLife            string      `json:"shelf_life" db:"shelf_life"`
	OrganicCertification string      `json:"organic_certification" db:"organic_certification"`
	Description          string      `json:"description"`
	TimeRange            string      `json:"delivery_days_range"`
	PriceRange           string      `json:"delivery_fees_range"`

	RatingsAndReviews RatingsAndReviews `json:"ratings_and_reviews"`
	RatingBreakdown   []int64           `json:"-"`

	//
	Ratings      float32  `json:"-" db:"ratings"`
	ReviewsCount uint     `json:"-" db:"reviews_count"`
	Reviews      []Review `json:"reviews"`

	// unused key
	CreatedAt  int64  `json:"-" db:"created_at"`
	UpdatedAt  int64  `json:"-" db:"updated_at"`
	CategoryID string `json:"-" db:"category_id"`
}

type GetProductWithPagination

type GetProductWithPagination struct {
	UserDetails UserDetails  `json:"user_details"`
	Products    []GetProduct `json:"products"`
	Pagination  `json:"pagination"`
}

type GetProperties

type GetProperties struct {
	//
	ID                string  `json:"id" db:"id"`
	Name              string  `json:"name" db:"name"`
	CategoryName      string  `json:"category_name" db:"category_name"`
	City              string  `json:"city" db:"city"`
	Price             int64   `json:"price" db:"price"`
	DiscountPrice     int64   `json:"discount_price"`
	Width             int     `json:"width" db:"width"`
	CertificationType string  `json:"ownership_type" db:"certification_type"`
	PhotoUrl          string  `json:"photo_url" db:"photo_url"`
	Ratings           float32 `json:"ratings" db:"ratings"`
	IsWishlisted      bool    `json:"is_wishlisted" db:"is_wishlisted"`
}

type GetPropertiesWithPagination

type GetPropertiesWithPagination struct {
	UserDetails UserDetails      `json:"user_details"`
	Provinces   []string         `json:"provinces"`
	Properties  GetAllProperties `json:"properties"`
	Pagination  Pagination       `json:"pagination"`
}

type GetPropertyDetails

type GetPropertyDetails struct {
	//
	UserDetails   UserDetails `json:"user_details"`
	ID            string      `json:"id" db:"id"`
	Name          string      `json:"name" db:"name"`
	Description   string      `json:"description" db:"description"`
	Price         int64       `json:"price" db:"price"`
	CategoryName  string      `json:"category_name" db:"category_name"`
	Width         int         `json:"width" db:"width"`
	Province      string      `json:"province" db:"province"`
	City          string      `json:"city" db:"city"`
	OwnershipType string      `json:"ownership_type" db:"ownership_type"`
	NameOfOwner   string      `json:"name_of_owner" db:"name_of_owner"`
	PhotoUrl      string      `json:"photo_url" db:"photo_url"`

	//
	DiscountPrice     int64                    `json:"discount_price" db:"discount_price"`
	InWishlist        bool                     `json:"in_wishlist" db:"in_wishlist"`
	PhotoUrls         []string                 `json:"photo_urls" db:"photo_urls"`
	RatingsAndReviews RatingAndReviewsProperty `json:"ratings_and_reviews"`
	Discuss           []PropertyDiscuss        `json:"discuss"`
	Highlights        []PropertyHighlights     `json:"highlights"`
}

type Homepage

type Homepage struct {
	//
	UserDetails   UserDetails           `json:"user_details"`
	PropertyPromo PropertyPromoHomePage `json:"property_promo"`
	ProductsPromo ProductsPromoHomePage `json:"products_promo"`
	Properties    GetAllProperties      `json:"properties"`
	Products      []GetProduct          `json:"products"`
	Educations    []EducationsHomePage  `json:"educations"`
}

type ManageCart

type ManageCart struct {
	ProductID string `json:"product_id"`
	Quantity  uint   `json:"quantity"`
}

type ManageWishlist

type ManageWishlist struct {
	ProductID    string `json:"product_id"`
	IsWishlisted bool   `json:"in_wishlist"`
}

type ManageWishlistProperties

type ManageWishlistProperties struct {
	PropertiesID string `json:"property_id"`
	IsWishlisted bool   `json:"is_wishlisted"`
}

type Market

type Market struct {
	//
	UserDetails   UserDetails           `json:"user_details"`
	PropertyPromo PropertyPromoHomePage `json:"property_promo"`
	ProductsPromo ProductsPromoHomePage `json:"products_promo"`
	Properties    PropertyMarket        `json:"properties"`
	Products      ProductMarket         `json:"products"`
}

type MyCart

type MyCart struct {
	UserDetails         UserDetails    `json:"user_details"`
	AvailableProducts   []CartProducts `json:"available"`
	UnavailableProducts []CartProducts `json:"unavailable"`
	Pagination          Pagination     `json:"pagination"`
}

type MyWishlist

type MyWishlist struct {
	//
	ProductID       string  `json:"product_id" db:"product_id"`
	ID              string  `json:"id" db:"id"`
	Name            string  `json:"name" db:"name"`
	Price           int64   `json:"price" db:"price"`
	DiscountPrice   int64   `json:"discount_price"`
	CategoryName    string  `json:"category_name" db:"category_name"`
	Ratings         float32 `json:"ratings" db:"ratings"`
	PhotoUrl        string  `json:"photo_url" db:"photo_url"`
	ProductIDString string  `json:"-" db:"product_id_string"`
}

type MyWishlistProperties

type MyWishlistProperties struct {
	//
	ID                string  `json:"id" db:"id"`
	Name              string  `json:"name" db:"name"`
	Price             int64   `json:"price" db:"price"`
	DiscountPrice     int64   `json:"discount_price"`
	CategoryName      string  `json:"category_name" db:"category_name"`
	Ratings           float32 `json:"star" db:"ratings"`
	PhotoUrl          string  `json:"photo_url" db:"photo_url"`
	CertificationType string  `json:"ownership_type" db:"certification_type"`
	Width             int     `json:"width" db:"width"`
	City              string  `json:"city" db:"city"`
	State             string  `json:"state" db:"state"`
	IsWishlisted      bool    `json:"in_wishlist" db:"in_wishlist"`
	ProductIDString   string  `json:"-" db:"product_id_string"`
}

type OAuth

type OAuth struct {
	Error        bool   `json:"error"`
	ErrorMessage string `json:"error_message"`
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	Token        string `json:"token"`
	IsRegistered bool   `json:"is_registered"`
}

type Pagination

type Pagination struct {
	Page       int   `json:"page"`
	TotalItems int64 `json:"count_items"`
	TotalPages int64 `json:"count_pages"`
}

type Picture

type Picture struct {
	Data PictureData `json:"data"`
}

type PictureData

type PictureData struct {
	Height       int    `json:"height"`
	IsSilhouette bool   `json:"is_silhouette"`
	URL          string `json:"url"`
	Width        int    `json:"width"`
}

type ProductMarket

type ProductMarket struct {
	//
	Products   []GetProduct `json:"products"`
	Pagination Pagination   `json:"pagination"`
}

type ProductWishlist

type ProductWishlist struct {
	UserDetails UserDetails  `json:"user_details"`
	Products    []MyWishlist `json:"products"`
	Pagination  Pagination   `json:"pagination"`
}

type ProductsPromoHomePage

type ProductsPromoHomePage struct {
	//
	TimeLifeInSeconds int64        `json:"time_life_in_seconds"`
	Products          []GetProduct `json:"products"`
}

type PropertiesWishlist

type PropertiesWishlist struct {
	UserDetails UserDetails            `json:"user_details"`
	Properties  []MyWishlistProperties `json:"properties"`
	Pagination  Pagination             `json:"pagination"`
}

type PropertyDiscuss

type PropertyDiscuss struct {
	//
	ID            string                   `json:"id" db:"id"`
	Name          string                   `json:"name" db:"name"`
	Content       string                   `json:"content" db:"content"`
	PhotoUrl      string                   `json:"photo_url" db:"photo_url"`
	Answers       []PropertyDiscussReplies `json:"answers"`
	AnswersString string                   `json:"-" db:"answers_string"`
}

type PropertyDiscussReplies

type PropertyDiscussReplies struct {
	//
	ID       string `json:"id" db:"id"`
	Name     string `json:"name" db:"name"`
	Content  string `json:"content" db:"content"`
	PhotoUrl string `json:"photo_url" db:"photo_url"`
	IsOwner  bool   `json:"is_owner"`
}

type PropertyHighlights

type PropertyHighlights struct {
	//
	Name     string `json:"name" db:"name"`
	PhotoUrl string `json:"photo_url" db:"photo_url"`
}

type PropertyMarket

type PropertyMarket struct {
	//
	Province   string          `json:"province"`
	Provinces  []string        `json:"provinces"`
	Data       []GetProperties `json:"data"`
	Pagination Pagination      `json:"pagination"`
}

type PropertyPromoHomePage

type PropertyPromoHomePage struct {
	//
	TimeLifeInSeconds int64           `json:"time_life_in_seconds"`
	Properties        []GetProperties `json:"properties"`
}

type RatingAndReviewsProperty

type RatingAndReviewsProperty struct {
	//
	CountRatings       int              `json:"count_ratings"`
	CountStarBreakDown []int            `json:"count_star_break_down"`
	Data               []RatingProperty `json:"data"`
}

type RatingBreakdown

type RatingBreakdown struct {
	Star  int   `json:"star" db:"star"`
	Total int64 `json:"total" db:"total"`
}

type RatingProperty

type RatingProperty struct {
	ID              string   `json:"id" db:"id"`
	Name            string   `json:"name" db:"name"`
	PhotoUrl        string   `json:"photo_url" db:"photo_url"`
	Content         string   `json:"content" db:"content"`
	CountHelpful    int      `json:"count_helpful" db:"count_helpful"`
	IsHelpful       bool     `json:"is_helpful" db:"is_helpful"`
	PhotoUrls       []string `json:"photo_urls" db:"photo_urls"`
	PhotoUrlsString string   `json:"-" db:"photo_urls_string"`
}

type RatingsAndReviews

type RatingsAndReviews struct {
	//
	Rating             float32  `json:"ratings"`
	CountRatings       int      `json:"count_ratings"`
	CountStarBreakdown []int64  `json:"count_star_breakdown"`
	Data               []Review `json:"data"`
}

type Review

type Review struct {
	ID                    string   `json:"id" db:"id"`
	Name                  string   `json:"name" db:"name"`
	PhotoUrl              string   `json:"photo_url" db:"photo_url"`
	Content               string   `json:"content" db:"content"`
	Star                  int      `json:"star" db:"star"`
	HelpfulCount          int      `json:"count_helpful" db:"helpful_count"`
	IsReviewHelpful       bool     `json:"is_helpful" db:"is_review_helpful"`
	PhotoReviewUrlsString string   `json:"-" db:"photo_reviews_urls_string"`
	PhotoReviewUrls       []string `json:"photo_review_urls"`
	CreatedAt             int64    `json:"created_at" db:"created_at"`

	// unused key
	UpdatedAt         int64  `json:"-" db:"updated_at"`
	UserID            string `json:"-" db:"user_id"`
	TransactionItemID string `json:"-" db:"transaction_item_id"`
}

type ReviewDetails

type ReviewDetails struct {
	UserDetails     UserDetails `json:"user_details"`
	CountRatings    int         `json:"count_ratings"`
	RatingBreakdown []int64     `json:"count_star_breakdown"`
	Reviews         []Review    `json:"reviews"`
	Pagination      Pagination  `json:"pagination"`
}

type Status

type Status struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type UserDetails

type UserDetails struct {
	//
	IsLoggedIn         bool   `json:"is_logged_in"`
	CountCarts         int    `json:"count_carts"`
	CountNotifications int    `json:"count_notifications"`
	PhotoProfile       string `json:"photo_profile"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL