import { IsNotEmpty, IsString, IsNumber, IsNotEmptyObject, } from "class-validator"; import { AbstractCommand, Command } from "@twixtlabs/lambda-cqrs-poc"; export abstract class ConversationCommand extends AbstractCommand { @IsString() @IsNotEmpty() public readonly tenantId: string; @IsString() @IsNotEmpty() public readonly conversationId: string; constructor({ commandName, tenantId, conversationId, }: { commandName: string; tenantId:string; conversationId: string; }) { super({ commandName, targetAggregateIdentifier: conversationId, }); this.tenantId = tenantId; this.conversationId = conversationId; } }