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:
Ali Reza
2026-07-21 17:52:36 +03:30
commit bb59d5e9ba
254 changed files with 37031 additions and 0 deletions
+73
View File
@@ -0,0 +1,73 @@
import {
IsInt,
IsOptional,
IsString,
MaxLength,
Min,
MinLength,
ValidateNested,
} from 'class-validator';
import { Type } from 'class-transformer';
import { CreateTransactionPaymentDto } from '../../transactions/dto/transaction.dto';
export class AddCartItemDto {
@IsString()
@MinLength(1)
storeItemVariantId!: string;
@IsOptional()
@IsInt()
@Min(1)
@Type(() => Number)
quantity?: number;
}
export class UpdateCartItemDto {
@IsInt()
@Min(1)
@Type(() => Number)
quantity!: number;
}
export class ShippingAddressDto {
@IsString()
@MinLength(1)
province!: string;
@IsString()
@MinLength(1)
city!: string;
@IsString()
@MinLength(1)
address!: string;
@IsOptional()
@IsString()
@MaxLength(20)
postalCode?: string;
@IsOptional()
@IsString()
landline?: string;
}
export class CheckoutCartDto {
@IsOptional()
@IsString()
@MinLength(1)
addressId?: string;
@IsOptional()
@ValidateNested()
@Type(() => ShippingAddressDto)
shippingAddress?: ShippingAddressDto;
@IsOptional()
@IsString()
customerNotes?: string;
@ValidateNested()
@Type(() => CreateTransactionPaymentDto)
payment!: CreateTransactionPaymentDto;
}