package model

import (
	"time"
)

type ProxyResponse struct {
	StatusCode int
	Header     map[string]string
	BodyBytes  []byte
}

type UpdateBffResponse struct {
	OrderRef   string
	UserID     int64             `json:"user_id,omitempty"`
	IsCustomer bool              `json:"is_customer,omitempty"`
	UpdatedAt  time.Time         `json:"updated_at,omitempty"`
	Note       NoteBffResponse   `json:"note,omitempty"`
	Incoterm   int32             `json:"incoterm,omitempty"`
	Shipment   UpdateBffShipment `json:"shipment,omitempty"`
	Document   UpdateBffDocument `json:"document,omitempty"`
}

// UpdateBffShipment is an struct to map shipment from update
type UpdateBffShipment struct {
	ShipmentId   uint64    `json:"shipmentId,omitempty"`
	OrderId      uint64    `json:"orderId,omitempty"`
	OrderRef     string    `json:"orderRef,omitempty"`
	IsCollection bool      `json:"isCollection,omitempty"`
	CourierRef   string    `json:"courierRef,omitempty"`
	TrackingCode string    `json:"trackingCode,omitempty"`
	TrackingUrl  string    `json:"trackingUrl,omitempty"`
	DispatchedAt time.Time `json:"dispatchedAt,omitempty"`
	CreatedAt    time.Time `json:"createdAt,omitempty"`
	NoWaybill    bool      `json:"noWaybill,omitempty"`
}

type UpdateBffDocument struct {
	OrderRef     string `json:"orderRef,omitempty"`
	DocumentType string `json:"documentType,omitempty"`
	Url          string `json:"url,omitempty"`
	Hash         string `json:"hash,omitempty"`
	InvoiceId    uint64 `json:"invoiceId,omitempty"`
	ShipmentId   uint64 `json:"shipmentId,omitempty"`
}

type NoteBffResponse struct {
	Details string `json:"details"`
}
