Update
This commit is contained in:
@@ -15,12 +15,14 @@ class ExportToken extends Model
|
||||
'token',
|
||||
'is_premium',
|
||||
'credits_reserved',
|
||||
'metadata',
|
||||
'expires_at',
|
||||
'used_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_premium' => 'boolean',
|
||||
'metadata' => 'array',
|
||||
'expires_at' => 'datetime',
|
||||
'used_at' => 'datetime',
|
||||
];
|
||||
|
||||
@@ -17,7 +17,6 @@ class TrackingContentSelection extends Model
|
||||
'content_type',
|
||||
'content_id',
|
||||
'content_name',
|
||||
'search_query',
|
||||
'selection_method',
|
||||
'action_at',
|
||||
];
|
||||
|
||||
@@ -19,8 +19,6 @@ class TrackingExport extends Model
|
||||
'meme_media_id',
|
||||
'background_media_id',
|
||||
'caption_texts',
|
||||
'export_format',
|
||||
'export_quality',
|
||||
'export_status',
|
||||
'error_message',
|
||||
'action_at',
|
||||
@@ -37,7 +35,6 @@ class TrackingExport extends Model
|
||||
|
||||
protected $attributes = [
|
||||
'platform' => 'web',
|
||||
'export_quality' => 'standard',
|
||||
'export_status' => 'initiated',
|
||||
];
|
||||
|
||||
|
||||
63
app/Models/TrackingSave.php
Normal file
63
app/Models/TrackingSave.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TrackingSave extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'track_saves';
|
||||
|
||||
protected $fillable = [
|
||||
'device_id',
|
||||
'user_agent',
|
||||
'ip_address',
|
||||
'platform',
|
||||
'meme_id',
|
||||
'meme_media_id',
|
||||
'background_media_id',
|
||||
'caption_texts',
|
||||
'is_premium_export',
|
||||
'action_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'caption_texts' => 'array',
|
||||
'is_premium_export' => 'boolean',
|
||||
'action_at' => 'datetime',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $attributes = [
|
||||
'platform' => 'web',
|
||||
'is_premium_export' => false,
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the related meme
|
||||
*/
|
||||
public function meme()
|
||||
{
|
||||
return $this->belongsTo(Meme::class, 'meme_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the related meme media
|
||||
*/
|
||||
public function memeMedia()
|
||||
{
|
||||
return $this->belongsTo(MemeMedia::class, 'meme_media_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the related background media
|
||||
*/
|
||||
public function backgroundMedia()
|
||||
{
|
||||
return $this->belongsTo(BackgroundMedia::class, 'background_media_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user