| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- import {
- IsInt,
- Min,
- Max,
- MinLength,
- IsString,
- IsBoolean,
- Allow,
- IsNumberString, IsOptional,
- } from 'class-validator';
- import { Expose } from 'class-transformer';
- /**
- * 增加菜单
- */
- export class CreateMenuDto {
- @IsInt()
- @Min(0)
- @Max(5)
- @Expose()
- type: number;
- @IsOptional()
- @IsInt()
- @Expose()
- parentId: number;
- @MinLength(2)
- @Expose()
- name: string;
- @IsInt()
- @Min(0)
- @Expose()
- orderNum: number;
- @IsOptional()
- @IsString()
- @Expose()
- router: string;
- @IsBoolean()
- @Expose()
- isShow: boolean;
- @IsOptional()
- @IsBoolean()
- @Expose()
- keepalive: boolean;
- @IsOptional()
- @IsString()
- @Expose()
- icon: string;
- @IsOptional()
- @IsString()
- @Expose()
- perms: string;
- @Allow()
- @Expose()
- viewPath: string;
- @IsInt()
- @Expose()
- status: string;
- }
- export class UpdateMenuDto extends CreateMenuDto {
- @IsInt()
- @Expose()
- menuId: number;
- }
- /**
- * 删除菜单
- */
- export class DeleteMenuDto {
- @IsInt()
- @Expose()
- menuId: number;
- }
- /**
- * 查询菜单
- */
- export class InfoMenuDto {
- @IsNumberString()
- @Expose()
- menuId: string;
- }
|