package request

import (
	"go-humas-be/app/database/entity"
)

type PpidDataApprovalHistoriesGeneric interface {
	ToEntity()
}

type PpidDataApprovalHistoriesCreateRequest struct {
	PpidDataId       uint   `json:"ppidDataId" validate:"required"`
	Message          string `json:"message" validate:"required"`
	ApprovalStatusId int    `json:"approvalStatusId" validate:"required"`
	ApprovalAtLevel  int    `json:"approvalAtLevel" validate:"required"`
}

func (req PpidDataApprovalHistoriesCreateRequest) ToEntity() *entity.PpidDataApprovalHistories {
	return &entity.PpidDataApprovalHistories{
		PpidDataId:       req.PpidDataId,
		Message:          req.Message,
		ApprovalStatusId: req.ApprovalStatusId,
		ApprovalAtLevel:  req.ApprovalAtLevel,
	}
}
