feat: complete admin panel and backend admin api migration

This commit is contained in:
s.esmaeili
2026-09-13 21:02:25 +03:30
parent 03119cd655
commit 267fc7b7d1
239 changed files with 25431 additions and 935 deletions
@@ -1,5 +1,6 @@
import { Type } from 'class-transformer';
import { ArrayMinSize, IsArray, IsInt, IsNumber, IsOptional, IsPositive, IsString, Min, ValidateNested } from 'class-validator';
import { OrderChannel } from '@prisma/client';
import { ArrayMinSize, IsArray, IsEnum, IsInt, IsNumber, IsOptional, IsPositive, IsString, Min, ValidateNested } from 'class-validator';
export class CreateOrderItemInputDto {
@IsString()
@@ -31,6 +32,15 @@ export class CreateOrderDto {
@IsString()
branchId?: string;
/**
* Which sales channel placed the order. Legacy had no such field because the
* two channels lived in separate tables (orders vs orders_orders); the one
* Order model carries the distinction here. Defaults to RETAIL.
*/
@IsOptional()
@IsEnum(OrderChannel)
channel?: OrderChannel;
@IsArray()
@ArrayMinSize(1)
@ValidateNested({ each: true })