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
@@ -0,0 +1,47 @@
import {
ArrayMinSize,
IsArray,
IsInt,
IsOptional,
IsString,
Matches,
MinLength,
ValidateIf,
} from 'class-validator';
import { Type } from 'class-transformer';
export class UpdateBusinessDto {
@IsOptional()
@IsString()
@MinLength(2)
nameFa?: string;
@IsOptional()
@IsString()
@MinLength(2)
name?: string;
@IsOptional()
@IsString()
about?: string;
@IsOptional()
@IsString()
@Matches(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, {
message: 'slug must be lowercase letters, numbers, and hyphens',
})
slug?: string;
@IsOptional()
@IsArray()
@ArrayMinSize(1)
@Type(() => Number)
@IsInt({ each: true })
categoryIds?: number[];
@IsOptional()
@ValidateIf((_, value) => value !== null)
@Type(() => Number)
@IsInt()
ownerUserId?: number | null;
}