2025-06-27 13:01:39 +07:00

21 lines
562 B
Go

package request
import "enaklo-pos-be/internal/entity"
type OpenCashierSessionRequest struct {
PartnerID int64 `json:"partner_id" validate:"required"`
OpeningAmount float64 `json:"opening_amount" validate:"required,gt=0"`
}
type CloseCashierSessionRequest struct {
ClosingAmount float64 `json:"closing_amount" validate:"required"`
}
func (o *OpenCashierSessionRequest) ToEntity(cashierID int64) *entity.CashierSession {
return &entity.CashierSession{
PartnerID: o.PartnerID,
CashierID: cashierID,
OpeningAmount: o.OpeningAmount,
}
}