Initial commit: Meshkee CMS API
NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import {
|
||||
IsEnum,
|
||||
IsOptional,
|
||||
IsString,
|
||||
MinLength,
|
||||
ValidateIf,
|
||||
} from 'class-validator';
|
||||
import { TransactionType } from '@prisma/client';
|
||||
|
||||
export class CreateTransactionPaymentDto {
|
||||
@IsEnum(TransactionType)
|
||||
type!: TransactionType;
|
||||
|
||||
@ValidateIf((dto) => dto.type === TransactionType.pos)
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
posType?: string;
|
||||
|
||||
@ValidateIf((dto) => dto.type === TransactionType.transfer)
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
transferAccount?: string;
|
||||
|
||||
@ValidateIf((dto) => dto.type === TransactionType.transfer)
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
transferRefNumber?: string;
|
||||
|
||||
@ValidateIf((dto) => dto.type === TransactionType.e_payment_gate)
|
||||
@IsString()
|
||||
@MinLength(1)
|
||||
gatewayType?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user