docs
This commit is contained in:
15
apps/api/src/shops/dto/shop-purchase.dto.ts
Normal file
15
apps/api/src/shops/dto/shop-purchase.dto.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { IsInt, IsString, Max, Min } from 'class-validator';
|
||||
|
||||
export class ShopPurchaseDto {
|
||||
@IsString()
|
||||
itemKey!: string;
|
||||
|
||||
/**
|
||||
* How many lots to buy. Bounded so one request cannot ask for a quantity
|
||||
* whose price overflows before the affordability check can reject it.
|
||||
*/
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(99)
|
||||
quantity!: number;
|
||||
}
|
||||
Reference in New Issue
Block a user