3333 * @property array recipients
3434 * @property string action
3535 * @property Closure when
36+ * @property Carbon last_failed_at
37+ * @property Carbon last_sent_at
3638 * @property string frequency_option
3739 */
3840class MailatorSchedule extends Model
@@ -45,13 +47,13 @@ public function getTable()
4547 return config ('mailator.schedulers_table_name ' , 'mailator_schedulers ' );
4648 }
4749
48- const MINUTES_IN_HOUR = 60 ;
49- const MINUTES_IN_DAY = 60 * 60 ;
50- const MINUTES_IN_WEEK = 168 * 60 ;
51- const HOURS_IN_DAY = 24 ;
52- const HOURS_IN_WEEK = 168 ;
50+ public const MINUTES_IN_HOUR = 60 ;
51+ public const MINUTES_IN_DAY = 60 * 60 ;
52+ public const MINUTES_IN_WEEK = 168 * 60 ;
53+ public const HOURS_IN_DAY = 24 ;
54+ public const HOURS_IN_WEEK = 168 ;
5355
54- const FREQUENCY_IN_HOURS = [
56+ public const FREQUENCY_IN_HOURS = [
5557 'single ' => PHP_INT_MAX ,
5658 'hourly ' => 1 ,
5759 'daily ' => self ::HOURS_IN_DAY ,
@@ -63,16 +65,16 @@ public function getTable()
6365 '168 ' => 'Weeks ' ,
6466 ];
6567
66- const TIME_FRAME_ORIGIN_BEFORE = 'before ' ;
67- const TIME_FRAME_ORIGIN_AFTER = 'after ' ;
68+ public const TIME_FRAME_ORIGIN_BEFORE = 'before ' ;
69+ public const TIME_FRAME_ORIGIN_AFTER = 'after ' ;
6870
69- const FREQUENCY_OPTIONS_MANY = 'many ' ;
70- const FREQUENCY_OPTIONS_ONCE = 'once ' ;
71- const FREQUENCY_OPTIONS_HOURLY = 'hourly ' ;
72- const FREQUENCY_OPTIONS_DAILY = 'daily ' ;
73- const FREQUENCY_OPTIONS_WEEKLY = 'weekly ' ;
74- const FREQUENCY_OPTIONS_NEVER = 'never ' ;
75- const FREQUENCY_OPTIONS_MANUAL = 'manual ' ;
71+ public const FREQUENCY_OPTIONS_MANY = 'many ' ;
72+ public const FREQUENCY_OPTIONS_ONCE = 'once ' ;
73+ public const FREQUENCY_OPTIONS_HOURLY = 'hourly ' ;
74+ public const FREQUENCY_OPTIONS_DAILY = 'daily ' ;
75+ public const FREQUENCY_OPTIONS_WEEKLY = 'weekly ' ;
76+ public const FREQUENCY_OPTIONS_NEVER = 'never ' ;
77+ public const FREQUENCY_OPTIONS_MANUAL = 'manual ' ;
7678
7779 protected $ fillable = [
7880 'action ' ,
@@ -93,6 +95,8 @@ public function getTable()
9395 'constraints ' => 'array ' ,
9496 'recipients ' => 'array ' ,
9597 'timestamp_target ' => 'datetime ' ,
98+ 'last_failed_at ' => 'datetime ' ,
99+ 'last_sent_at ' => 'datetime ' ,
96100 ];
97101
98102 protected $ dates = [
0 commit comments