19 lines
469 B
Go
19 lines
469 B
Go
package request
|
|
|
|
import "enaklo-pos-be/internal/entity"
|
|
|
|
type OpenCashierSessionRequest struct {
|
|
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{
|
|
CashierID: cashierID,
|
|
OpeningAmount: o.OpeningAmount,
|
|
}
|
|
}
|