48 lines
685 B
TypeScript
48 lines
685 B
TypeScript
|
|
import { Type } from 'class-transformer'
|
||
|
|
import {
|
||
|
|
IsBoolean,
|
||
|
|
IsDateString,
|
||
|
|
IsInt,
|
||
|
|
IsNumber,
|
||
|
|
IsOptional,
|
||
|
|
IsString,
|
||
|
|
} from 'class-validator'
|
||
|
|
|
||
|
|
export class CreateProductChargeDto {
|
||
|
|
@Type(() => Number)
|
||
|
|
@IsNumber()
|
||
|
|
count: number
|
||
|
|
|
||
|
|
@Type(() => Number)
|
||
|
|
@IsNumber()
|
||
|
|
fee: number
|
||
|
|
|
||
|
|
@Type(() => Number)
|
||
|
|
@IsNumber()
|
||
|
|
totalAmount: number
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsBoolean()
|
||
|
|
@Type(() => Boolean)
|
||
|
|
isSettled?: boolean
|
||
|
|
|
||
|
|
@IsDateString()
|
||
|
|
buyAt: string
|
||
|
|
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
description?: string
|
||
|
|
|
||
|
|
@Type(() => Number)
|
||
|
|
@IsInt()
|
||
|
|
productId: number
|
||
|
|
|
||
|
|
@Type(() => Number)
|
||
|
|
@IsInt()
|
||
|
|
inventoryId: number
|
||
|
|
|
||
|
|
@Type(() => Number)
|
||
|
|
@IsInt()
|
||
|
|
supplierId: number
|
||
|
|
}
|