Revert "voucher"

This reverts commit cfe690a40f.
This commit is contained in:
Aditya Siregar
2025-09-16 19:31:39 +07:00
parent 36c2352cb2
commit 12ee54390f
15 changed files with 2 additions and 1199 deletions
-51
View File
@@ -1,51 +0,0 @@
package contract
type VoucherResponse struct {
ID int64 `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
PhoneNumber string `json:"phone_number"`
VoucherCode string `json:"voucher_code"`
WinnerNumber int `json:"winner_number"`
IsWinner bool `json:"is_winner"`
}
type VoucherSpinResponse struct {
VoucherCode string `json:"voucher_code"`
Name string `json:"name"`
PhoneNumber string `json:"phone_number"` // This will be masked
IsWinner bool `json:"is_winner"`
}
type ListVouchersForSpinRequest struct {
Limit int `json:"limit" validate:"min=1,max=50"`
}
type ListVouchersForSpinResponse struct {
Vouchers []VoucherSpinResponse `json:"vouchers"`
Count int `json:"count"`
}
type PaginatedVoucherResponse struct {
Data []VoucherResponse `json:"data"`
TotalCount int `json:"total_count"`
Page int `json:"page"`
Limit int `json:"limit"`
TotalPages int `json:"total_pages"`
}
type VoucherRow struct {
RowNumber int `json:"row_number"`
Vouchers []VoucherSpinResponse `json:"vouchers"`
}
type ListVouchersByRowsRequest struct {
Rows int `json:"rows" validate:"min=1,max=10"`
WinnerNumber *int `json:"winner_number,omitempty"`
}
type ListVouchersByRowsResponse struct {
Rows []VoucherRow `json:"rows"`
TotalRows int `json:"total_rows"`
TotalVouchers int `json:"total_vouchers"`
}