管理后台左侧列表调整
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsArray, IsBoolean, IsIn, IsNotEmpty, IsNumber, IsObject, IsOptional, IsString, Min } from 'class-validator';
|
||||
import {
|
||||
IsArray,
|
||||
IsBoolean,
|
||||
IsIn,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsObject,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Min,
|
||||
MinLength,
|
||||
ValidateIf,
|
||||
} from 'class-validator';
|
||||
|
||||
export class UpdateStoreStatusDto {
|
||||
@IsString()
|
||||
@@ -413,9 +425,22 @@ export class UpdateDeliveryDto {
|
||||
}
|
||||
|
||||
export class CreateHqAccountDto {
|
||||
@IsIn(['phone', 'password'])
|
||||
credentialType: 'phone' | 'password';
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
phone?: string;
|
||||
|
||||
@ValidateIf((o: CreateHqAccountDto) => o.credentialType === 'password')
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
phone: string;
|
||||
loginName?: string;
|
||||
|
||||
@ValidateIf((o: CreateHqAccountDto) => o.credentialType === 'password')
|
||||
@IsString()
|
||||
@MinLength(6)
|
||||
password?: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@@ -427,6 +452,14 @@ export class CreateHqAccountDto {
|
||||
}
|
||||
|
||||
export class UpdateHqAccountDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
loginName?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MinLength(6)
|
||||
password?: string;
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
name?: string;
|
||||
@@ -440,6 +473,18 @@ export class UpdateHqAccountDto {
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export class SaveHqRolePermissionsDto {
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
permissionKeys: string[];
|
||||
}
|
||||
|
||||
export class SaveHqAccountPermissionsDto {
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
permissionKeys: string[];
|
||||
}
|
||||
|
||||
export class CreateProductDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
|
||||
Reference in New Issue
Block a user