package model

import (
	"time"

	"go.mongodb.org/mongo-driver/bson/primitive"
)

const (
	GROUPSTATE_UNSET   = "unset"
	GROUPSTATE_ADDED   = "added"
	GROUPSTATE_CROPING = "croping"
	GROUPSTATE_SUCC    = "succ"
	GROUPSTATE_FAIL    = "fail"
)

// 一套360度图片
type Asset360Group struct {
	Id        string `bson:"id,omitempty" json:"id"`
	GroupName string `bson:"groupName,omitempty" json:"groupName"` //白色
	Name      string `bson:"name,omitempty" json:"name"`           //正视

	//36张图片信息
	ImagesPath  string `bson:"imagesPath,omitempty" json:"imagesPath"`   //https://oss.xxx/id/
	ImageWidth  int    `bson:"imageWidth,omitempty" json:"imageWidth"`   //1944,
	ImageHeight int    `bson:"imageHeight,omitempty" json:"imageHeight"` //2592,

	Url string `bson:"url,omitempty" json:"url"` //http://192.168.110.115:8082/scene/Id/index.html?assetPath="https:/xxx/xx"

	//已创建 / 后台处理中 / 后台处理失败 / 处理成功
	//created/croping/fail/succ
	State string `bson:"state,omitempty" json:"state"`
}

type Asset360Fake3d struct {
	Id       primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
	SupplyId primitive.ObjectID `bson:"supplyId,omitempty" json:"supplyId"`

	//鞋子型号
	Name       string    `bson:"name,omitempty" json:"name"`
	CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
	Thumbnail  string    `bson:"thumbnail,omitempty" json:"thumbnail"`

	Groups []*Asset360Group `bson:"groups,omitempty" json:"groups"`
}
