package dto

import "time"

// Response
type SellerCourier struct {
	ID                        int64                  `json:"id"`
	CourierID                 int64                  `json:"courierId"`
	Courier                   *Courier               `json:"courier"`
	CourierAuthenticationInfo map[string]interface{} `json:"courierAuthenticationInfo"`
	Verified                  bool                   `json:"verified"`
	Deactivate                bool                   `json:"deactivate"`
	LastUpdated               time.Time              `json:"lastUpdated"`
}

type GetSellerCouriersResponse struct {
	Data []*SellerCourier `json:"data"`
}

type GetAccountAssociateStatusRequest struct {
	SellerCourierID int64 `uri:"id"`
}

type GetAccountAssociateStatusResponse struct {
	Associated bool `json:"associated"`
}

type GetSellerCouriersRequest struct {
	Deactivate bool `form:"deactivate"`
	Verified   bool `form:"verified"`
}

type UpdateSellerCourierStatusRequest struct {
	ID         int64 `uri:"id" swaggerignore:"true"`
	Deactivate bool  `json:"deactivate"`
}

type CreateSellerCourierRequest struct {
	CourierID int64  `json:"courierId" binding:"required"`
	Key       string `json:"key,omitempty"`

	AuthenticationInfoNinjaVan
	AuthenticationInfoJnT
	AuthenticationInfoJnTMalaysia
	AuthenticationInfoJnTSingapore
	AuthenticationInfoKerryExpressTH
}

type UpdateSellerCourierRequest struct {
	ID  int64  `uri:"id" swaggerignore:"true"`
	Key string `json:"key,omitempty"`

	AuthenticationInfoNinjaVan
	AuthenticationInfoJnT
	AuthenticationInfoJnTMalaysia
	AuthenticationInfoJnTSingapore
	AuthenticationInfoKerryExpressTH
}

type DeleteSellerCourierRequest struct {
	ID int64 `uri:"id"`
}

/*---------------------------------------------------------------------------------------------------------------------*/

type CourierAuthenticationInfo struct {
	FlashExpress   AuthenticationInfoFlashExpress   `json:"flashExpress"`
	FlashExpressPH AuthenticationInfoFlashExpressPH `json:"flashExpressPH"`
	JnT            AuthenticationInfoJnT            `json:"jnT"`
	JnTMalaysia    AuthenticationInfoJnTMalaysia    `json:"jntMalaysia"`
	JnTSingapore   AuthenticationInfoJnTSingapore   `json:"jnTSG,omitempty"`
	NinjaVan       AuthenticationInfoNinjaVan       `json:"ninjaVan"`
	KerryExpressTH AuthenticationInfoKerryExpressTH `json:"kerryExpress"`
}

type AuthenticationInfoFlashExpress struct {
	SubMchID string `json:"subMchId,omitempty"`
}

type AuthenticationInfoFlashExpressPH struct {
	MerchantCode string `json:"merchantCode,omitempty"`
	Key          string `json:"key,omitempty"`
}

type AuthenticationInfoJnT struct {
	ShopID   string `json:"shopId,omitempty" `
	ShopName string `json:"shopName,omitempty"`
}

type AuthenticationInfoJnTMalaysia struct {
	CustomerCode string `json:"customerCode" `
	Password     string `json:"password"`
}

type AuthenticationInfoNinjaVan struct {
	SellerID   string `json:"sellerId,omitempty" `
	SellerName string `json:"sellerName,omitempty"`
}

type AuthenticationInfoJnTSingapore struct {
	MerchantCode string `json:"merchantCode,omitempty"`
}

type AuthenticationInfoKerryExpressTH struct {
	MerchantID string `json:"merchantId,omitempty"`
}
