import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty } from 'class-validator';
import { CreateDto } from 'src/common/dto/create.dto';

export class UserDto extends CreateDto {
  @ApiProperty({ description: '用户名' })
  @IsNotEmpty({ message: '用户名不能为空' })
  username: string;

  @ApiProperty({ description: '姓名' })
  @IsNotEmpty({ message: '姓名不能为空' })
  name: string;

  @ApiProperty({ description: '角色 ID' })
  @IsNotEmpty({ message: '角色不能为空' })
  roleId: number;

  @ApiProperty({ description: '组织机构 ID' })
  @IsNotEmpty({ message: '组织机构不能为空' })
  orgId: number;

  @ApiProperty({ description: '多级组织机构 ID ' })
  @IsNotEmpty({ message: '组织机构不能为空' })
  orgIds: string;

  @ApiProperty({ description: '管辖老师' })
  manageTeacher: [];

  @ApiProperty({ description: '照片' })
  photo: number;

  @ApiProperty({ description: '头像' })
  avatar: string;

  @ApiProperty({ description: '性别：0/女，1/男' })
  sex: number;

  @ApiProperty({ description: '出生年月' })
  birthday: Date;

  @ApiProperty({ description: '身份证号' })
  idcard: string;

  @ApiProperty({ description: '职位' })
  identity: string;

  @ApiProperty({ description: '电话' })
  phone: string;

  @ApiProperty({ description: '邮箱' })
  email: string;
}
