import { ApiProperty } from '@nestjs/swagger';
import { CreateDto } from 'src/common/dto/create.dto';
import { IsArray, IsBoolean, IsString } from 'class-validator';
export class CreateManualsManageDto extends CreateDto {
  @ApiProperty({ description: '手册名称', example: '测试手册' })
  @IsString()
  name: string;

  @ApiProperty({ description: '手册说明', example: '这里是测试手册' })
  @IsString()
  explain: string;

  @ApiProperty({ description: '是否置顶', example: false })
  @IsBoolean({ message: '是否置顶请传入boolean值' })
  stick: boolean;

  @ApiProperty({ description: '可以查看的角色列表', example: [] })
  @IsArray({ message: '请上传数组列表' })
  canView: Array<number>;

  @ApiProperty({ description: '可以编辑的角色列表', example: [] })
  @IsArray({ message: '请上传数组列表' })
  canEditor: Array<number>;

  @ApiProperty({ description: '密码', example: false })
  @IsString()
  password: string;

  @ApiProperty({ description: '编著', example: false })
  @IsString()
  compile: string;

  @ApiProperty({ description: '出版', example: false })
  @IsString()
  publish: string;

  @ApiProperty({ description: '封面', example: false })
  @IsString()
  cover: string;
}
