package talent_model

import (
	"github.com/gogf/gf/os/gtime"
	"github.com/gogf/gf/util/gmeta"
)

type ProductCoverInfo struct {
	gmeta.Meta    `orm:"table:product"`
	ProductId     int             `json:"-"`
	ProductPrice  int64           `json:"product_price"`
	ProductCovers []*ProductPhoto `orm:"with:product_id=id, where:symbol=1"`
}

type SimpleTaskBaseInfo struct {
	gmeta.Meta      `orm:"table:task_base_info"`
	TaskId          int                `json:"task_id"`
	TaskMode        int                `json:"task_mode"`
	TaskName        string             `json:"task_name"`
	TaskPlatform    int                `json:"task_platform"`
	ContentForm     int                `json:"content_form"`
	TaskStatus      int                `json:"task_status"`
	DeadlineTime    gtime.Time         `json:"deadline_time"`
	ProductId       int                `json:"-"`
	ProductInfo     *ProductInfo       `orm:"with:product_id=product_id"`
	NeedTalentCount []*NeedTalentCount `orm:"with:task_base_id=task_id"`
	TaskSignUpInfo  []*OrderInfo       `orm:"with:task_id=task_id"`
	IsBuySamples    *IsBuySamples      `orm:"with:task_base_id=task_id"`
	BuySamplesCost  *BuySamplesCost    `orm:"with:task_base_id=task_id"`
}

type SimpleTaskResult struct {
	MaxPage int `json:"max_page"`
	TaskInfos []*SimpleTaskBaseInfo
}