mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-31 19:27:51 -06:00
Cleaned out most of the "reminders" code.
This commit is contained in:
parent
7c97c558ab
commit
65a2e07d24
@ -28,25 +28,11 @@ class CreateRemindersTable extends Migration
|
||||
$table->increments('id');
|
||||
$table->timestamps();
|
||||
$table->string('class', 40);
|
||||
$table->integer('piggybank_id')->unsigned()->nullable();
|
||||
$table->integer('recurring_transaction_id')->unsigned()->nullable();
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->date('startdate');
|
||||
$table->date('enddate')->nullable();
|
||||
$table->boolean('active');
|
||||
|
||||
|
||||
// connect reminders to piggy banks.
|
||||
$table->foreign('piggybank_id')
|
||||
->references('id')->on('piggybanks')
|
||||
->onDelete('set null');
|
||||
|
||||
// connect reminders to recurring transactions.
|
||||
$table->foreign('recurring_transaction_id')
|
||||
->references('id')->on('recurring_transactions')
|
||||
->onDelete('set null');
|
||||
|
||||
|
||||
// connect reminders to users
|
||||
$table->foreign('user_id')
|
||||
->references('id')->on('users')
|
||||
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
class PiggybankReminder extends Reminder
|
||||
{
|
||||
protected $isSubclass = true;
|
||||
|
||||
|
||||
}
|
@ -62,15 +62,6 @@ class RecurringTransaction extends Ardent
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function reminders()
|
||||
{
|
||||
return $this->hasMany('RecurringTransactionReminder');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Carbon
|
||||
*/
|
||||
|
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* RecurringTransactionReminder
|
||||
*
|
||||
* @property integer $id
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property string $class
|
||||
* @property integer $piggybank_id
|
||||
* @property integer $recurring_transaction_id
|
||||
* @property integer $user_id
|
||||
* @property \Carbon\Carbon $startdate
|
||||
* @property \Carbon\Carbon $enddate
|
||||
* @property boolean $active
|
||||
* @property-read \Piggybank $piggybank
|
||||
* @property-read \RecurringTransaction $recurringTransaction
|
||||
* @property-read \User $user
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereClass($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder wherePiggybankId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereRecurringTransactionId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereUserId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereStartdate($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereEnddate($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\RecurringTransactionReminder whereActive($value)
|
||||
* @method static \Reminder validOn($date)
|
||||
* @method static \Reminder validOnOrAfter($date)
|
||||
*/
|
||||
class RecurringTransactionReminder extends Reminder
|
||||
{
|
||||
protected $isSubclass = true;
|
||||
|
||||
public function render()
|
||||
{
|
||||
return '123';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -215,6 +215,14 @@ use LaravelBook\Ardent\Builder;
|
||||
* 'Budget[] $budgets
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\
|
||||
* 'Category[] $categories
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\
|
||||
* 'Budget[] $budgets
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\
|
||||
* 'Category[] $categories
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\
|
||||
* 'Budget[] $budgets
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\
|
||||
* 'Category[] $categories
|
||||
*/
|
||||
class TransactionJournal extends Ardent
|
||||
{
|
||||
|
@ -78,22 +78,6 @@ class User extends Ardent implements UserInterface, RemindableInterface
|
||||
return $this->hasMany('Budget');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function reminders()
|
||||
{
|
||||
return $this->hasMany('Reminder');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function piggybankreminders()
|
||||
{
|
||||
return $this->hasMany('PiggybankReminder');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user