mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Cleaned out most of the "reminders" code.
This commit is contained in:
@@ -28,25 +28,11 @@ class CreateRemindersTable extends Migration
|
|||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->string('class', 40);
|
$table->string('class', 40);
|
||||||
$table->integer('piggybank_id')->unsigned()->nullable();
|
|
||||||
$table->integer('recurring_transaction_id')->unsigned()->nullable();
|
|
||||||
$table->integer('user_id')->unsigned();
|
$table->integer('user_id')->unsigned();
|
||||||
$table->date('startdate');
|
$table->date('startdate');
|
||||||
$table->date('enddate')->nullable();
|
$table->date('enddate')->nullable();
|
||||||
$table->boolean('active');
|
$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
|
// connect reminders to users
|
||||||
$table->foreign('user_id')
|
$table->foreign('user_id')
|
||||||
->references('id')->on('users')
|
->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
|
* @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
|
* 'Budget[] $budgets
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection|\
|
* @property-read \Illuminate\Database\Eloquent\Collection|\
|
||||||
* 'Category[] $categories
|
* '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
|
class TransactionJournal extends Ardent
|
||||||
{
|
{
|
||||||
|
@@ -78,22 +78,6 @@ class User extends Ardent implements UserInterface, RemindableInterface
|
|||||||
return $this->hasMany('Budget');
|
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
|
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user