| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- import { Allow, ArrayMinSize, ArrayNotEmpty, IsInt, IsOptional, IsString } from 'class-validator';
- import { Expose } from 'class-transformer';
- export class CreateGroupDto {
- @Allow()
- @Expose()
- name: string;
- @Allow()
- @Expose()
- username: string;
- @Allow()
- @IsInt()
- @Expose()
- groupId:number;
- @Allow()
- @Expose()
- description:string;
- @IsInt()
- @Expose()
- type:number;
- @Allow()
- @IsInt()
- @Expose()
- defaultBotId:number;
- @IsInt()
- @Expose()
- status:number;
- @IsOptional()
- @ArrayMinSize(0)
- @Expose()
- tgGroupBots: number[];
- }
- export class UpdateGroupDto extends CreateGroupDto {
- @IsInt()
- @Expose()
- id: number;
- }
- export class DeleteGroupDto {
- @ArrayNotEmpty()
- @Expose()
- ids: number[];
- }
- export class SendGroupsMsgDto {
- @ArrayNotEmpty()
- @Expose()
- groupIds:number[];
- @IsString()
- @Expose()
- message:string;
- }
- export class SendMsgDto{
- @IsInt()
- @Expose()
- groupId: number;
- @IsInt()
- @Expose()
- botId: number;
- @IsString()
- @Expose()
- message:string;
- }
|