package dto

import "time"

// ================ Delivery Plan ================

type DeliveryPlan struct {
	ID             int64     `json:"id"`
	Name           string    `json:"name"`
	Code           string    `json:"code"`
	CountryID      int64     `json:"countryId"`
	CourierID      int64     `json:"courierId"`
	MinDeliveryDay int       `json:"minDeliveryDay"`
	MaxDeliveryDay int       `json:"maxDeliveryDay"`
	Deactivate     bool      `json:"deactivate"`
	EffectiveDate  time.Time `json:"effectiveDate"`
}

type GetDeliveryPlansRequest struct {
	CountryCode string `form:"countryCode,default=th"`
	CourierID   int64  `form:"courierId"`
	Deactivate  bool   `form:"deactivate"`
}

type GetDeliveryPlansResponse struct {
	Data []*DeliveryPlan `json:"data"`
}

type CreateDeliveryPlanRequest struct {
	Name           string    `json:"name"`
	Code           string    `json:"code"`
	CountryID      int64     `json:"countryId"`
	CourierID      int64     `json:"courierId"`
	MinDeliveryDay int       `json:"minDeliveryDay"`
	MaxDeliveryDay int       `json:"maxDeliveryDay"`
	Deactivate     bool      `json:"deactivate"`
	EffectiveDate  time.Time `json:"effectiveDate"`
}

type CreateDeliveryPlanResponse struct {
	Data *DeliveryPlan `json:"data"`
}

type UpdateDeliveryPlanRequest struct {
	ID             int64     `uri:"id" swaggerignore:"true"`
	Name           string    `json:"name"`
	Code           string    `json:"code"`
	CountryID      int64     `json:"countryId"`
	CourierID      int64     `json:"courierId"`
	MinDeliveryDay int       `json:"minDeliveryDay"`
	MaxDeliveryDay int       `json:"maxDeliveryDay"`
	Deactivate     bool      `json:"deactivate"`
	EffectiveDate  time.Time `json:"effectiveDate"`
}

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