import { UUID } from '@boostercloud/framework-types' ; import { ProductUpdated } from '../../../events/product-updated' ; import { ProductUpdateReason } from '../../../events/product-updated' ; import { SKU } from '../../../common/sku' ; import { Money } from '../../../common/money' ; import { Picture } from '../../../common/picture' ; interface Product { readonly id : UUID ; readonly sku : SKU ; readonly name : string ; readonly description : string ; readonly price : Money ; readonly pictures : Array < Picture > ; readonly deleted : boolean ; } export class ProductUpdatedV1 { public constructor ( readonly product ) { } public entityID ( ) { return this . product . id ; } } export class ProductUpdatedV2 { public constructor ( readonly product , readonly reason ) { } public entityID ( ) { return this . product . id ; } } export class ProductUpdatedV3 { public constructor ( readonly product , readonly reason ) { } public entityID ( ) { return this . product . id ; } } export class ProductUpdatedV4 extends ProductUpdated { }