feat: complete admin panel and backend admin api migration
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { IsBoolean, IsEnum, IsOptional, IsString } from 'class-validator';
|
||||
import { OrderStatus } from '@prisma/client';
|
||||
|
||||
/**
|
||||
* Body of legacy `POST single/order-sts/edit`.
|
||||
*
|
||||
* Legacy posted the whole timeline row back, so it carried `status`, an optional
|
||||
* `note`, and `remove: true` when the operator was deleting a status instead of
|
||||
* setting one. The order id travelled on the row as `order_id`/`orderId`.
|
||||
*/
|
||||
export class UpdateOrderStatusDto {
|
||||
@IsString()
|
||||
orderId!: string;
|
||||
|
||||
@IsEnum(OrderStatus)
|
||||
status!: OrderStatus;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
note?: string;
|
||||
|
||||
/** legacy: row.remove = true -> delete this status event rather than add one */
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
remove?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user