20 lines
1.0 KiB
Go
20 lines
1.0 KiB
Go
|
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"` // 更新追蹤的時間
|
|||
|
}
|
|||
|
|
|||
|
func (p *ProductStatistics) CollectionName() string {
|
|||
|
return "product_statistics"
|
|||
|
}
|