package http_model

import "time"

type SupplierInvoiceListRequest struct {
	SupplierId    int   `json:"supplier_id"`    // 服务商ID
	InvoiceStatus int   `json:"invoice_status"` // 发票状态
	PageNum       int32 `json:"page_num"`
	PageSize      int32 `json:"page_size"`
}

type SupplierInvoiceListData struct {
	SupplierInvoiceList []*SupplierInvoiceInfo `json:"supplier_invoice_list"` // 服务商加入商单的种草任务信息
	Total               int64                  `json:"total"`                 // 数量
}

type SupplierInvoiceInfo struct {
	STaskInfo         []*STaskInfo `json:"s_task_info"`         // 任务信息
	UploadInvoiceTime *time.Time   `json:"upload_invoice_time"` // 上传发票时间
	Amount            float64      `json:"amount"`              // 回票金额
	SOperator         int          `json:"s_operator"`          // 操作人
	Company           string       `json:"company"`             // 开具发票的公司
	AgreeTime         *time.Time   `json:"agree_time"`          // 同意时间
	RejectTime        *time.Time   `json:"reject_time"`         // 拒绝时间
	FailReason        string       `json:"fail_reason"`         // 拒绝原因
	InvoiceUrl        string       `json:"invoice_url"`         // 发票url
}

type STaskInfo struct {
	Id            int     `json:"id"`             // 种草、本地生活ID
	ServiceCharge float64 `json:"service_charge"` // 服务费收入
}

func NewSupplierInvoiceListRequest() *SupplierInvoiceListRequest {
	return new(SupplierInvoiceListRequest)
}

func NewSupplierInvoiceListResponse() *CommonResponse {
	resp := new(CommonResponse)
	resp.Data = new(SupplierInvoiceListData)
	return resp
}
