Instagram jobs refactor + started InstagramNotifications
This commit is contained in:
30
app/Models/InstagramNotification.php
Normal file
30
app/Models/InstagramNotification.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class InstagramNotification extends Model
|
||||
{
|
||||
protected $table = 'instagram_notifications';
|
||||
|
||||
protected $fillable = [
|
||||
'username',
|
||||
'instagram_repost_id',
|
||||
'notification_type',
|
||||
'message',
|
||||
'is_read',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'notification_type' => InstagramNotificationType::class,
|
||||
'is_read' => 'boolean',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $attributes = [
|
||||
'is_read' => false,
|
||||
'is_processed' => false,
|
||||
];
|
||||
}
|
14
app/Models/InstagramNotificationType.php
Normal file
14
app/Models/InstagramNotificationType.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
enum InstagramNotificationType: string
|
||||
{
|
||||
case LIKE = 'LIKE';
|
||||
case COMMENT = 'COMMENT';
|
||||
case FOLLOW = 'FOLLOW';
|
||||
case MESSAGE = 'MESSAGE';
|
||||
case SYSTEM = 'SYSTEM'; // System message like congratulatory messages or updates
|
||||
case MENTION = 'MENTION';
|
||||
case OTHER = 'OTHER'; // Uncategorized or unclassified notifications
|
||||
}
|
Reference in New Issue
Block a user