package vclaimsepprint

import (
	ecore "simrs-vx/internal/domain/base-entities/core"
)

type CreateDto struct {
	VclaimSep_Number *string `json:"vclaimSep_number"`
}

type ReadListDto struct {
	FilterDto
	Includes   string `json:"includes"`
	Sort       string `json:"sort"`
	Pagination ecore.Pagination
}

type FilterDto struct {
	VclaimSep_Number *string `json:"vclaimSep_number"`
}

type ReadDetailDto struct {
	Id uint `json:"id"`
}

type UpdateDto struct {
	Id uint `json:"id"`
	CreateDto
}

type DeleteDto struct {
	Id uint `json:"id"`
}

type MetaDto struct {
	PageNumber int `json:"page_number"`
	PageSize   int `json:"page_size"`
	Count      int `json:"count"`
}

type ResponseDto struct {
	ecore.Main
	VclaimSep_Number *string `json:"vclaimSep_number"`
	Counter          *uint   `json:"counter"`
}

func (d VclaimSepPrint) ToResponse() ResponseDto {
	resp := ResponseDto{
		VclaimSep_Number: d.VclaimSep_Number,
		Counter:          d.Counter,
	}
	resp.Main = d.Main
	return resp
}

func ToResponseList(data []VclaimSepPrint) []ResponseDto {
	resp := make([]ResponseDto, len(data))
	for i, u := range data {
		resp[i] = u.ToResponse()
	}
	return resp
}
