Add Events

This commit is contained in:
David Bomba 2019-04-19 18:49:14 +10:00
parent 4cf01d7358
commit 5282b6e77d
43 changed files with 1241 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Client;
use Illuminate\Queue\SerializesModels;
/**
* Class ClientWasArchived.
*/
class ClientWasArchived extends Event
{
use SerializesModels;
/**
* @var Client
*/
public $client;
/**
* Create a new event instance.
*
* @param Client $client
*/
public function __construct(Client $client)
{
$this->client = $client;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Client;
use Illuminate\Queue\SerializesModels;
/**
* Class ClientWasCreated.
*/
class ClientWasCreated extends Event
{
use SerializesModels;
/**
* @var Client
*/
public $client;
/**
* Create a new event instance.
*
* @param Client $client
*/
public function __construct(Client $client)
{
$this->client = $client;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Client;
use Illuminate\Queue\SerializesModels;
/**
* Class ClientWasDeleted.
*/
class ClientWasDeleted extends Event
{
use SerializesModels;
/**
* @var Client
*/
public $client;
/**
* Create a new event instance.
*
* @param Client $client
*/
public function __construct(Client $client)
{
$this->client = $client;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Client;
use Illuminate\Queue\SerializesModels;
/**
* Class ClientWasRestored.
*/
class ClientWasRestored extends Event
{
use SerializesModels;
/**
* @var Client
*/
public $client;
/**
* Create a new event instance.
*
* @param Client $client
*/
public function __construct(Client $client)
{
$this->client = $client;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Client;
use Illuminate\Queue\SerializesModels;
/**
* Class ClientWasUpdated.
*/
class ClientWasUpdated extends Event
{
use SerializesModels;
/**
* @var Client
*/
public $client;
/**
* Create a new event instance.
*
* @param Client $client
*/
public function __construct(Client $client)
{
$this->client = $client;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Expense;
use Illuminate\Queue\SerializesModels;
/**
* Class ExpenseWasArchived.
*/
class ExpenseWasArchived extends Event
{
use SerializesModels;
/**
* @var Expense
*/
public $expense;
/**
* Create a new event instance.
*
* @param Expense $expense
*/
public function __construct(Expense $expense)
{
$this->expense = $expense;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Expense;
use Illuminate\Queue\SerializesModels;
/**
* Class ExpenseWasCreated.
*/
class ExpenseWasCreated extends Event
{
use SerializesModels;
/**
* @var Expense
*/
public $expense;
/**
* Create a new event instance.
*
* @param Expense $expense
*/
public function __construct(Expense $expense)
{
$this->expense = $expense;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Expense;
use Illuminate\Queue\SerializesModels;
/**
* Class ExpenseWasDeleted.
*/
class ExpenseWasDeleted extends Event
{
use SerializesModels;
/**
* @var Expense
*/
public $expense;
/**
* Create a new event instance.
*
* @param Expense $expense
*/
public function __construct(Expense $expense)
{
$this->expense = $expense;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Expense;
use Illuminate\Queue\SerializesModels;
/**
* Class ExpenseWasRestored.
*/
class ExpenseWasRestored extends Event
{
use SerializesModels;
/**
* @var Expense
*/
public $expense;
/**
* Create a new event instance.
*
* @param Expense $expense
*/
public function __construct(Expense $expense)
{
$this->expense = $expense;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Expense;
use Illuminate\Queue\SerializesModels;
/**
* Class ExpenseWasUpdated.
*/
class ExpenseWasUpdated extends Event
{
use SerializesModels;
/**
* @var Expense
*/
public $expense;
/**
* Create a new event instance.
*
* @param Expense $expense
*/
public function __construct(Expense $expense)
{
$this->expense = $expense;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceWasArchived.
*/
class InvoiceWasArchived extends Event
{
use SerializesModels;
/**
* @var Invoice
*/
public $invoice;
/**
* Create a new event instance.
*
* @param Invoice $invoice
*/
public function __construct(Invoice $invoice)
{
$this->invoice = $invoice;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceWasCreated.
*/
class InvoiceWasCreated extends Event
{
use SerializesModels;
/**
* @var Invoice
*/
public $invoice;
/**
* Create a new event instance.
*
* @param Invoice $invoice
*/
public function __construct(Invoice $invoice)
{
$this->invoice = $invoice;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceWasDeleted.
*/
class InvoiceWasDeleted extends Event
{
use SerializesModels;
/**
* @var Invoice
*/
public $invoice;
/**
* Create a new event instance.
*
* @param Invoice $invoice
*/
public function __construct(Invoice $invoice)
{
$this->invoice = $invoice;
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace App\Events;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceWasEmailed.
*/
class InvoiceWasEmailed extends Event
{
use SerializesModels;
/**
* @var Invoice
*/
public $invoice;
/**
* @var string
*/
public $notes;
/**
* Create a new event instance.
*
* @param Invoice $invoice
*/
public function __construct(Invoice $invoice, $notes)
{
$this->invoice = $invoice;
$this->notes = $notes;
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace App\Events;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceWasRestored.
*/
class InvoiceWasRestored extends Event
{
use SerializesModels;
/**
* @var Invoice
*/
public $invoice;
public $fromDeleted;
/**
* Create a new event instance.
*
* @param Invoice $invoice
* @param $fromDeleted
*/
public function __construct(Invoice $invoice, $fromDeleted)
{
$this->invoice = $invoice;
$this->fromDeleted = $fromDeleted;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Invoice;
use Illuminate\Queue\SerializesModels;
/**
* Class InvoiceWasUpdated.
*/
class InvoiceWasUpdated extends Event
{
use SerializesModels;
/**
* @var Invoice
*/
public $invoice;
/**
* Create a new event instance.
*
* @param Invoice $invoice
*/
public function __construct(Invoice $invoice)
{
$this->invoice = $invoice;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentCompleted.
*/
class PaymentCompleted extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
/**
* Create a new event instance.
*
* @param Payment $payment
*/
public function __construct(Payment $payment)
{
$this->payment = $payment;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentFailed.
*/
class PaymentFailed extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
/**
* Create a new event instance.
*
* @param Payment $payment
*/
public function __construct(Payment $payment)
{
$this->payment = $payment;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentWasArchived.
*/
class PaymentWasArchived extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
/**
* Create a new event instance.
*
* @param Payment $payment
*/
public function __construct(Payment $payment)
{
$this->payment = $payment;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentWasCreated.
*/
class PaymentWasCreated extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
/**
* Create a new event instance.
*
* @param Payment $payment
*/
public function __construct(Payment $payment)
{
$this->payment = $payment;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentWasDeleted.
*/
class PaymentWasDeleted extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
/**
* Create a new event instance.
*
* @param Payment $payment
*/
public function __construct(Payment $payment)
{
$this->payment = $payment;
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentWasRefunded.
*/
class PaymentWasRefunded extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
public $refundAmount;
/**
* Create a new event instance.
*
* @param Payment $payment
* @param $refundAmount
*/
public function __construct(Payment $payment, $refundAmount)
{
$this->payment = $payment;
$this->refundAmount = $refundAmount;
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentWasRestored.
*/
class PaymentWasRestored extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
public $fromDeleted;
/**
* Create a new event instance.
*
* @param Payment $payment
* @param $fromDeleted
*/
public function __construct(Payment $payment, $fromDeleted)
{
$this->payment = $payment;
$this->fromDeleted = $fromDeleted;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Payment;
use Illuminate\Queue\SerializesModels;
/**
* Class PaymentWasVoided.
*/
class PaymentWasVoided extends Event
{
use SerializesModels;
/**
* @var Payment
*/
public $payment;
/**
* Create a new event instance.
*
* @param Payment $payment
*/
public function __construct(Payment $payment)
{
$this->payment = $payment;
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Events;
use App\Models\Product;
use Illuminate\Queue\SerializesModels;
class ProductWasCreated extends Event
{
use SerializesModels;
/**
* @var Product
*/
public $product;
/**
* @var array
**/
public $input;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(Product $product, $input = null)
{
$this->product = $product;
$this->input = $input;
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace App\Events;
use App\Models\Product;
use Illuminate\Queue\SerializesModels;
class ProductWasDeleted extends Event
{
use SerializesModels;
/**
* @var Product
*/
public $product;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(Product $product)
{
$this->product = $product;
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Events;
use App\Models\Product;
use Illuminate\Queue\SerializesModels;
class ProductWasUpdated extends Event
{
use SerializesModels;
/**
* @var Product
*/
public $product;
/**
* @var array
**/
public $input;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(Product $product, $input = null)
{
$this->product = $product;
$this->input = $input;
}
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
class QuoteWasArchived extends Event
{
use SerializesModels;
public $quote;
/**
* Create a new event instance.
*
* @param $quote
*/
public function __construct($quote)
{
$this->quote = $quote;
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class QuoteWasCreated.
*/
class QuoteWasCreated extends Event
{
use SerializesModels;
public $quote;
/**
* Create a new event instance.
*
* @param $quote
*/
public function __construct($quote)
{
$this->quote = $quote;
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class QuoteWasDeleted.
*/
class QuoteWasDeleted extends Event
{
use SerializesModels;
public $quote;
/**
* Create a new event instance.
*
* @param $quote
*/
public function __construct($quote)
{
$this->quote = $quote;
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class QuoteWasEmailed.
*/
class QuoteWasEmailed extends Event
{
use SerializesModels;
public $quote;
/**
* @var string
*/
public $notes;
/**
* Create a new event instance.
*
* @param $quote
*/
public function __construct($quote, $notes)
{
$this->quote = $quote;
$this->notes = $notes;
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class QuoteWasRestored.
*/
class QuoteWasRestored extends Event
{
use SerializesModels;
public $quote;
/**
* Create a new event instance.
*
* @param $quote
*/
public function __construct($quote)
{
$this->quote = $quote;
}
}

View File

@ -0,0 +1,24 @@
<?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
/**
* Class QuoteWasUpdated.
*/
class QuoteWasUpdated extends Event
{
use SerializesModels;
public $quote;
/**
* Create a new event instance.
*
* @param $quote
*/
public function __construct($quote)
{
$this->quote = $quote;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Task;
use Illuminate\Queue\SerializesModels;
/**
* Class TaskWasArchived.
*/
class TaskWasArchived extends Event
{
use SerializesModels;
/**
* @var Task
*/
public $task;
/**
* Create a new event instance.
*
* @param Task $task
*/
public function __construct(Task $task)
{
$this->task = $task;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Task;
use Illuminate\Queue\SerializesModels;
/**
* Class TaskWasCreated.
*/
class TaskWasCreated extends Event
{
use SerializesModels;
/**
* @var Task
*/
public $task;
/**
* Create a new event instance.
*
* @param Task $task
*/
public function __construct(Task $task)
{
$this->task = $task;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Task;
use Illuminate\Queue\SerializesModels;
/**
* Class TaskWasDeleted.
*/
class TaskWasDeleted extends Event
{
use SerializesModels;
/**
* @var Task
*/
public $task;
/**
* Create a new event instance.
*
* @param Task $task
*/
public function __construct(Task $task)
{
$this->task = $task;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Task;
use Illuminate\Queue\SerializesModels;
/**
* Class TaskWasRestored.
*/
class TaskWasRestored extends Event
{
use SerializesModels;
/**
* @var Task
*/
public $task;
/**
* Create a new event instance.
*
* @param Task $task
*/
public function __construct(Task $task)
{
$this->task = $task;
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Task;
use Illuminate\Queue\SerializesModels;
/**
* Class TaskWasUpdated.
*/
class TaskWasUpdated extends Event
{
use SerializesModels;
/**
* @var Task
*/
public $task;
/**
* Create a new event instance.
*
* @param Task $task
*/
public function __construct(Task $task)
{
$this->task = $task;
}
}

30
app/Events/Vendor/VendorWasArchived.php vendored Normal file
View File

@ -0,0 +1,30 @@
<?php
namespace App\Events;
use App\Models\Vendor;
use Illuminate\Queue\SerializesModels;
/**
* Class VendorWasArchived.
*/
class VendorWasArchived extends Event
{
// vendor
use SerializesModels;
/**
* @var Vendor
*/
public $vendor;
/**
* Create a new event instance.
*
* @param Vendor $vendor
*/
public function __construct(Vendor $vendor)
{
$this->vendor = $vendor;
}
}

29
app/Events/Vendor/VendorWasCreated.php vendored Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Vendor;
use Illuminate\Queue\SerializesModels;
/**
* Class VendorWasCreated.
*/
class VendorWasCreated extends Event
{
use SerializesModels;
/**
* @var Vendor
*/
public $vendor;
/**
* Create a new event instance.
*
* @param Vendor $vendor
*/
public function __construct(Vendor $vendor)
{
$this->vendor = $vendor;
}
}

29
app/Events/Vendor/VendorWasDeleted.php vendored Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Vendor;
use Illuminate\Queue\SerializesModels;
/**
* Class VendorWasDeleted.
*/
class VendorWasDeleted extends Event
{
use SerializesModels;
/**
* @var Vendor
*/
public $vendor;
/**
* Create a new event instance.
*
* @param Vendor $vendor
*/
public function __construct(Vendor $vendor)
{
$this->vendor = $vendor;
}
}

29
app/Events/Vendor/VendorWasRestored.php vendored Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Vendor;
use Illuminate\Queue\SerializesModels;
/**
* Class VendorWasRestored.
*/
class VendorWasRestored extends Event
{
use SerializesModels;
/**
* @var Vendor
*/
public $vendor;
/**
* Create a new event instance.
*
* @param Vendor $vendor
*/
public function __construct(Vendor $vendor)
{
$this->vendor = $vendor;
}
}

29
app/Events/Vendor/VendorWasUpdated.php vendored Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace App\Events;
use App\Models\Vendor;
use Illuminate\Queue\SerializesModels;
/**
* Class VendorWasUpdated.
*/
class VendorWasUpdated extends Event
{
use SerializesModels;
/**
* @var Vendor
*/
public $vendor;
/**
* Create a new event instance.
*
* @param Vendor $vendor
*/
public function __construct(Vendor $vendor)
{
$this->vendor = $vendor;
}
}