package entity

type Product struct {
	Id                 int64    `json:"id"`
	Name               string   `json:"name"`
	CategoryId         int64    `json:"category_id"`
	CategoryName       string   `json:"category_name"`
	Thumbnail          string   `json:"thumbnail"`
	ImageArray         string   `json:"image_array"`
	ApartmentId        int64    `json:"apartment_id"`
	Description        string   `json:"description"`
	Stock              int64    `json:"stock"`
	Unit               string   `json:"unit"`
	Price              int      `json:"price"`
	DeliveryType       int      `json:"delivery_type"`
	DeliveryCommitTime int      `json:"delivery_commit_time"`
	UserId             int64    `json:"user_id"`
	UserName           string   `json:"user_name"`
	UserRate           float64  `json:"user_rate"`
	Images             []string `json:"images"`
}

type ProductItem struct {
	Id                   int64    `json:"id"`
	Name                 string   `json:"name"`
	Description          string   `json:"description"`
	Stock                int64    `json:"stock"`
	Price                int      `json:"price"`
	Unit                 string   `json:"unit"`
	DeliveryType         int      `json:"delivery_type"`
	DeliveryCommitTime   int      `json:"delivery_commit_time"`
	StoreId              int64    `json:"store_id"`
	SellerId             int64    `json:"seller_id"`
	CategoryId           int64    `json:"category_id"`
	ApartmentId          int64    `json:"apartment_id"`
	IsQuoteAfterOrdering bool     `json:"is_quote_after_ordering"`
	Thumbnail            string   `json:"thumbnail"`
	ImagesArray          []string `json:"images" gorm:"-"`
	Images               string   `json:"-"`
}

type GetProductResponse struct {
	Response
	Data ProductItem `json:"data"`
}

type ListProductResponse struct {
	Response
	Data []ProductItem `json:"data"`
}
