Defining Notifications
Defining a Notification
// StockRebalancingCompleteNotification.cfc
component extends="megaphone.models.BaseNotification" accessors="true" {
property name="stockSymbol";
property name="completionTimestamp";
public array function via( required any notifiable ) {
return [ "database" ];
}
public struct function toDatabase( required any notifiable ) {
return {
"stockSymbol": getStockSymbol(),
"completionTimestamp": getCompletionTimestamp()
};
}
}via
to{ChannelType} methods
Last updated
