package adminkindboxreqhandler

import (
	"time"

	adminaddresshandler "git.gocasts.ir/ebhomengo/niki/delivery/http_server/admin/address"
	"git.gocasts.ir/ebhomengo/niki/entity"
	"git.gocasts.ir/ebhomengo/niki/param"
	adminbenefactorparam "git.gocasts.ir/ebhomengo/niki/param/admin/benefactor"
	adminrefertimeparam "git.gocasts.ir/ebhomengo/niki/param/admin/refer_time"
)

type KindBoxReqAggregatedResponse struct {
	ID                 uint                        `json:"id"`
	BenefactorID       uint                        `json:"benefactor_id"`
	KindBoxType        entity.KindBoxType          `json:"kind_box_type"`
	CountRequested     uint                        `json:"count_requested"`
	CountAccepted      uint                        `json:"count_accepted"`
	Description        string                      `json:"description"`
	Status             entity.KindBoxReqStatus     `json:"status"`
	DeliverReferTimeID uint                        `json:"deliver_refer_time_id"`
	DeliverReferDate   time.Time                   `json:"deliver_refer_date"`
	DeliverAddressID   uint                        `json:"deliver_address_id"`
	SenderAgentID      uint                        `json:"sender_agent_id"`
	DeliveredAt        *time.Time                  `json:"delivered_at"`
	Benefactor         adminbenefactorparam.Data   `json:"benefactor"`
	DeliverAddress     adminaddresshandler.Address `json:"deliver_address"`
	DeliverReferTime   adminrefertimeparam.Data    `json:"deliver_refer_time"`
}

type KindBoxReqAggregatedListResponse struct {
	ID                 uint                      `json:"id"`
	BenefactorID       uint                      `json:"benefactor_id"`
	KindBoxType        entity.KindBoxType        `json:"kind_box_type"`
	CountRequested     uint                      `json:"count_requested"`
	CountAccepted      uint                      `json:"count_accepted"`
	Description        string                    `json:"description"`
	Status             entity.KindBoxReqStatus   `json:"status"`
	DeliverReferTimeID uint                      `json:"deliver_refer_time_id"`
	DeliverReferDate   time.Time                 `json:"deliver_refer_date"`
	DeliverAddressID   uint                      `json:"deliver_address_id"`
	SenderAgentID      uint                      `json:"sender_agent_id"`
	DeliveredAt        *time.Time                `json:"delivered_at"`
	Benefactor         adminbenefactorparam.Data `json:"benefactor"`
}

type KindBoxReqsAggregatedResponse struct {
	Data        []KindBoxReqAggregatedListResponse `json:"data"`
	Pagination  param.PaginationResponse           `json:"pagination"`
	FieldErrors map[string]string                  `json:"field_errors,omitempty"`
}
