ticket
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import { IsOptional, IsString, IsNumber, Min, IsIn, IsDateString } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { WalletTransactionType, WalletTransactionReason } from '../interface/wallet';
|
||||
|
||||
|
||||
// Define the valid sort directions
|
||||
const sortOrderOptions = ['asc', 'desc'] as const;
|
||||
type SortOrder = (typeof sortOrderOptions)[number];
|
||||
@@ -40,27 +39,12 @@ export class FindWalletTransactionsDto {
|
||||
@Type(() => Number)
|
||||
limit?: number = 10;
|
||||
|
||||
/**
|
||||
* Filter by transaction type
|
||||
*/
|
||||
@ApiPropertyOptional({
|
||||
description: 'Transaction type filter',
|
||||
enum: WalletTransactionType,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsIn(Object.values(WalletTransactionType))
|
||||
type?: WalletTransactionType;
|
||||
|
||||
|
||||
/**
|
||||
* Filter by transaction reason
|
||||
*/
|
||||
@ApiPropertyOptional({
|
||||
description: 'Transaction reason filter',
|
||||
enum: WalletTransactionReason,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsIn(Object.values(WalletTransactionReason))
|
||||
reason?: WalletTransactionReason;
|
||||
|
||||
|
||||
/**
|
||||
* Filter transactions from this date onwards
|
||||
|
||||
Reference in New Issue
Block a user