1
0

bot.ts 542 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { Allow, IsInt, IsString } from 'class-validator';
  2. import { Expose } from 'class-transformer';
  3. export class CreateBotDto {
  4. @IsInt()
  5. @Expose()
  6. botId:number;
  7. @Allow()
  8. @Expose()
  9. username: string;
  10. @Allow()
  11. @Expose()
  12. name: string;
  13. @IsString()
  14. @Expose()
  15. token: string;
  16. @IsInt()
  17. @Expose()
  18. status:number;
  19. @Allow()
  20. @Expose()
  21. description:string;
  22. }
  23. export class UpdateBotDto extends CreateBotDto {
  24. @IsInt()
  25. @Expose()
  26. id: number;
  27. }
  28. export class DeleteBotDto {
  29. @IsInt()
  30. @Expose()
  31. id: number;
  32. }