| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import {
- IsInt,
- IsNumberString,
- ArrayNotEmpty,
- IsString,
- Min,
- IsOptional,
- } from 'class-validator';
- import { Expose } from 'class-transformer';
- export class CreateDeptDto {
- @IsString()
- @Expose()
- departmentName: string;
- @IsInt()
- @Expose()
- parentDepartmentId: number;
- @IsOptional()
- @IsInt()
- @Min(0)
- @Expose()
- orderNum: number;
- }
- export class UpdateDeptDto {
- @IsInt()
- @Expose()
- id: number;
- @IsString()
- @Expose()
- name: string;
- @IsInt()
- @Expose()
- parentId: number;
- @IsOptional()
- @IsInt()
- @Min(0)
- @Expose()
- orderNum: number;
- }
- export class DeleteDeptDto {
- @IsInt()
- @Expose()
- departmentId: number;
- }
- export class InfoDeptDto {
- @IsNumberString()
- @Expose()
- departmentId: string;
- }
- export class TransferDeptDto {
- @ArrayNotEmpty()
- @Expose()
- userIds: number[];
- @IsInt()
- @Expose()
- departmentId: number;
- }
|