app-cloudep-product-service/pkg/domain/entity/product_statistics.go

22 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package entity
import "go.mongodb.org/mongo-driver/bson/primitive"
// ProductStatistics 統計的資訊表
type ProductStatistics struct {
ID primitive.ObjectID `bson:"_id,omitempty"` // 專案 ID
ProductID string `bson:"product_id"` // 對應的專案 ID
Orders uint64 `bson:"total_orders"` // 總接單數
OrdersUpdateTime int64 `bson:"total_orders_update_time"` // 更新總接單數的時間
AverageRating float64 `bson:"average_rating"` // 綜合評價4.5 顆星)
AverageRatingUpdateTime int64 `bson:"average_rating_time"` // 更新評價的時間
FansCount uint64 `bson:"fans_count"` // 追蹤數量
FansCountUpdateTime int64 `bson:"fans_count_update_time"` // 更新追蹤的時間
UpdatedAt int64 `bson:"updated_at"` // 更新時間
CreatedAt int64 `bson:"created_at"` // 創建時間
}
func (p *ProductStatistics) CollectionName() string {
return "product_statistics"
}